diff options
author | Niels Möller <nisse@lysator.liu.se> | 2022-08-05 21:18:53 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2022-08-05 21:18:53 +0200 |
commit | f4ec224a9903f89bd45b5a3563df502c885d8bf6 (patch) | |
tree | 597e1da1ff3d5d9c5d778e042953ca0aced8bb9d | |
parent | b3f94f19ec40cd3826522100d52b7d737bf721ab (diff) | |
download | nettle-f4ec224a9903f89bd45b5a3563df502c885d8bf6.tar.gz |
Fix to getopt.c includes.
* getopt.c: Include stdlib.h and unistd.h unconditionally,
similarly to the gnulib version of this file.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | getopt.c | 15 |
2 files changed, 9 insertions, 11 deletions
@@ -1,3 +1,8 @@ +2022-08-05 Niels Möller <nisse@lysator.liu.se> + + * getopt.c: Include stdlib.h and unistd.h unconditionally, + similarly to the gnulib version of this file. + 2022-08-04 Niels Möller <nisse@lysator.liu.se> From Brad Smith: @@ -30,6 +30,10 @@ #endif #include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C @@ -50,17 +54,6 @@ #ifndef ELIDE_CODE -/* This needs to come after some library #include - to get __GNU_LIBRARY__ defined. */ -#ifdef __GNU_LIBRARY__ -/* Don't include stdlib.h for non-GNU C libraries because some of them - contain conflicting prototypes for getopt. */ -# include <stdlib.h> -# include <unistd.h> -#endif /* GNU C library. */ - -#include <string.h> - #ifdef VMS # include <unixlib.h> #endif |