]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
testsuite: stdlib/isomac.c: add missing include
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 8 Jan 2019 20:10:28 +0000 (21:10 +0100)
committerSunil K Pandey <skpgkp2@gmail.com>
Fri, 10 May 2024 02:05:44 +0000 (19:05 -0700)
When running the testsuite, building stdlib/isomac.c outputs the
following warning:

  gcc -O   -D_GNU_SOURCE -DIS_IN_build -include /home/aurel32/glibc-build/config.h isomac.c -o /home/aurel32/glibc-build/stdlib/isomac
  isomac.c: In function ‘get_null_defines’:
  isomac.c:260:3: warning: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration]
     close (fd);
     ^~~~~
     pclose

Fix that by adding the <unistd.h> include.

Changelog:
* stdlib/isomac.c: Include <unistd.h>.
(cherry picked from commit 11f382ee780649549428cb25af3a9f1d3465868d)

ChangeLog
stdlib/isomac.c

index 1bd2a57c730d2b8340cde8ebbd734fe34458e1eb..a7bacf7b7b2fcaa72ec03fb41bc7d7c33ab584b9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2019-02-03  Aurelien Jarno  <aurelien@aurel32.net>
+
+       * stdlib/isomac.c: Include <unistd.h>.
+
 2019-06-06  Florian Weimer  <fweimer@redhat.com>
 
        * sysdeps/unix/sysv/linux/riscv/flush-icache.c: Do not use
index 37f564c82a50158c374736be6ed3cd90bb9357ac..7d743cb8e517578e5189e15576e401bf1c6f9684 100644 (file)
@@ -74,6 +74,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 #define HEADER_MAX          256