From 488dd7086925b83bb36568965558221e04d2cc91 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 29 May 2011 04:24:13 +0200 Subject: 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 --- libbb/getopt32.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libbb/getopt32.c') diff --git a/libbb/getopt32.c b/libbb/getopt32.c index 18f33c704..c7c4079c2 100644 --- a/libbb/getopt32.c +++ b/libbb/getopt32.c @@ -7,7 +7,9 @@ * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ -#include +#if ENABLE_LONG_OPTS || ENABLE_FEATURE_GETOPT_LONG +# include +#endif #include "libbb.h" /* Documentation -- cgit v1.2.3