diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-05-29 06:24:13 +0400 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-05-29 06:24:52 +0400 |
commit | 488dd7086925b83bb36568965558221e04d2cc91 (patch) | |
tree | 2c4ee47019880b24cb308eef3eb6f9fd211fbafb /util-linux/getopt.c | |
parent | 217a7f4bf95339a93a217c5806c5b9a48c0027d5 (diff) |
fix !ENABLE_FEATURE_GETOPT_LONG build. Closes 3775
When compiling with !ENABLE_FEATURE_GETOPT_LONG, busybox still tries
to include getopt.h which is not available; for example with uClibc
when !UCLIBC_HAS_GETOPT_LONG. getopt.h is only required
for the _long set of functions.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/getopt.c')
-rw-r--r-- | util-linux/getopt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util-linux/getopt.c b/util-linux/getopt.c index 10e1dc49b..85ff76189 100644 --- a/util-linux/getopt.c +++ b/util-linux/getopt.c @@ -25,7 +25,7 @@ * Added NLS support (partly written by Arkadiusz Mickiewicz * <misiek@misiek.eu.org>) * Ported to Busybox - Alfred M. Szmidt <ams@trillian.itslinux.org> - * Removed --version/-V and --help/-h in + * Removed --version/-V and --help/-h * Removed parse_error(), using bb_error_msg() from Busybox instead * Replaced our_malloc with xmalloc and our_realloc with xrealloc * @@ -79,7 +79,9 @@ //usage: " esac\n" //usage: "done\n" -#include <getopt.h> +#if ENABLE_FEATURE_GETOPT_LONG +# include <getopt.h> +#endif #include "libbb.h" /* NON_OPT is the code that is returned when a non-option is found in '+' |