From c3d84877524d8bfcc182699a682c37834de0bc50 Mon Sep 17 00:00:00 2001 From: Franck LeCodeur Date: Fri, 27 Aug 2021 22:02:33 +0200 Subject: [PATCH] jam: Fix build warnings. Add missing include for POSIX compliant systems. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Warnings were: Cc bin.linuxx86/fileunix.o fileunix.c: In function ‘file_archscan’: fileunix.c:217:6: warning: implicit declaration of function ‘read’; did you mean ‘fread’? [-Wimplicit-function-declaration] 217 | if( read( fd, buf, SARMAG ) != SARMAG || | ^~~~ | fread fileunix.c:220:6: warning: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration] 220 | close( fd ); | ^~~~~ | pclose fileunix.c:272:3: warning: implicit declaration of function ‘lseek’; did you mean ‘fseek’? [-Wimplicit-function-declaration] 272 | lseek(fd, offset + SARHDR, 0); | ^~~~~ | fseek Change-Id: Iedcdec01deb929d6c91ebc9d7eb72497fe078dd4 Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4399 Reviewed-by: Adrien Destugues --- jam/fileunix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jam/fileunix.c b/jam/fileunix.c index d4f3427f45..1fb6f63508 100644 --- a/jam/fileunix.c +++ b/jam/fileunix.c @@ -58,7 +58,7 @@ # define STRUCT_DIRENT struct dirent # endif -# ifdef __CYGWIN__ +# if defined(__CYGWIN__) || defined(unix) # include # endif