aboutsummaryrefslogtreecommitdiff
path: root/util-linux/getopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/getopt.c')
-rw-r--r--util-linux/getopt.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index 63294c520..79d54854b 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -246,12 +246,7 @@ static int generate_output(char **argv, int argc, const char *optstr, const stru
/* We used it already in main() in getopt32(),
* we *must* reset getopt(3): */
-#ifdef __GLIBC__
- optind = 0;
-#else /* BSD style */
- optind = 1;
- /* optreset = 1; */
-#endif
+ GETOPT_RESET();
while (1) {
#if ENABLE_FEATURE_GETOPT_LONG