[PATCH] testsuite: stdlib/isomac.c: add missing include
Jonathan Nieder
jrnieder@gmail.com
Tue Jan 8 23:36:00 GMT 2019
Aurelien Jarno wrote:
> 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>.
> ---
> ChangeLog | 4 ++++
> stdlib/isomac.c | 1 +
> 2 files changed, 5 insertions(+)
Indeed, in POSIX close() requires unistd.h[*].
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
[*] pubs.opengroup.org/onlinepubs/9699919799/functions/close.html
More information about the Libc-alpha
mailing list