about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2019-01-08 21:10:28 +0100
committerSunil K Pandey <skpgkp2@gmail.com>2024-05-09 19:11:00 -0700
commitc0a523f13b0868d03046a7e479fe5fb7039bd397 (patch)
tree62d47d4e3a34ba613cc02e931ceced53a325013d
parent13f1198286d641cf264710b435bd36728379a6d0 (diff)
downloadglibc-c0a523f13b0868d03046a7e479fe5fb7039bd397.tar.gz
glibc-c0a523f13b0868d03046a7e479fe5fb7039bd397.tar.xz
glibc-c0a523f13b0868d03046a7e479fe5fb7039bd397.zip
testsuite: stdlib/isomac.c: add missing include
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)
-rw-r--r--ChangeLog4
-rw-r--r--stdlib/isomac.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f9157d179b..95b7e2a59e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2019-02-03  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* stdlib/isomac.c: Include <unistd.h>.
+
 2018-11-07  Florian Weimer  <fweimer@redhat.com>
 
 	Implement TEST_COMPARE_STRING.
diff --git a/stdlib/isomac.c b/stdlib/isomac.c
index 0873eaa505..439b000734 100644
--- a/stdlib/isomac.c
+++ b/stdlib/isomac.c
@@ -74,6 +74,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 #define HEADER_MAX          256