⛏️ index : buildtools.git

author Franck LeCodeur <cassisian@gmail.com> 2021-08-27 22:02:33.0 +02:00:00
committer Jérôme Duval <jerome.duval@gmail.com> 2021-09-02 19:34:43.0 +00:00:00
commit
c3d84877524d8bfcc182699a682c37834de0bc50 [patch]
tree
83d62526fe684b2796054e48062b9da21e662898
parent
f5c73e1b9072b5b40d49c01462dd71541cdb6a65
download
c3d84877524d8bfcc182699a682c37834de0bc50.tar.gz

jam: Fix build warnings. Add missing include for POSIX compliant systems.

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 <pulkomandy@gmail.com>

Diff

 jam/fileunix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jam/fileunix.c b/jam/fileunix.c
index d4f3427..1fb6f63 100644
--- a/jam/fileunix.c
+++ a/jam/fileunix.c
@@ -58,7 +58,7 @@
# define STRUCT_DIRENT struct dirent 
# endif

# ifdef __CYGWIN__
# if defined(__CYGWIN__) || defined(unix)

# include <unistd.h>
# endif