Add includes.h to compat tests.

On platforms where closefrom returns void (eg glibc>=2.34) the prototype
for closefrom in its compat tests would cause compile errors.  Remove
this and have the tests pull in the compat headers in the same way as
the main code.  bz#3336.
This commit is contained in:
Darren Tucker 2021-08-11 09:21:09 +10:00
parent 931f592f26
commit 419aa01123
7 changed files with 13 additions and 3 deletions

View File

@ -7,7 +7,7 @@ VPATH=@srcdir@
CC=@CC@
LD=@LD@
CFLAGS=@CFLAGS@
CPPFLAGS=-I. -I.. -I$(srcdir) -I$(srcdir)/.. @CPPFLAGS@ @DEFS@
CPPFLAGS=-I. -I.. -I../.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. @CPPFLAGS@ @DEFS@
EXEEXT=@EXEEXT@
LIBCOMPAT=../libopenbsd-compat.a
LIBS=@LIBS@

View File

@ -14,6 +14,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "includes.h"
#include <sys/types.h>
#include <sys/stat.h>
@ -24,8 +26,6 @@
#define NUM_OPENS 10
int closefrom(int);
void
fail(char *msg)
{

View File

@ -14,6 +14,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "includes.h"
#include <stdio.h>
#include <stdlib.h>

View File

@ -17,6 +17,8 @@
#define BUFSZ 2048
#include "includes.h"
#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>

View File

@ -14,6 +14,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "includes.h"
#include <stdlib.h>
#include <string.h>

View File

@ -17,6 +17,8 @@
/* OPENBSD ORIGINAL: regress/lib/libc/strtonum/strtonumtest.c */
#include "includes.h"
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -14,6 +14,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "includes.h"
#include <sys/types.h>
#include <sys/stat.h>