From 6016181b68a9e8a9fb99893242851128b6bd5656 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 29 Aug 2017 14:32:17 +0200 Subject: hush: GETOPT_RESET() _after_ getopts too. NOEXEC'ed applets which use getopt() need this. function old new delta builtin_getopts 403 413 +10 Signed-off-by: Denys Vlasenko --- include/libbb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/libbb.h') diff --git a/include/libbb.h b/include/libbb.h index 95a7470a8..06f887732 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1212,7 +1212,7 @@ uint32_t getopt32long(char **argv, const char *optstring, const char *longopts, * By ~2008, OpenBSD 3.4 was changed to survive glibc-like optind = 0 * (to interpret it as if optreset was set). */ -#ifdef __GLIBC__ +#if 1 /*def __GLIBC__*/ #define GETOPT_RESET() (optind = 0) #else /* BSD style */ #define GETOPT_RESET() (optind = 1) -- cgit v1.2.3