summaryrefslogtreecommitdiffstats
path: root/libc/unistd/getopt-susv3.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/unistd/getopt-susv3.c')
-rw-r--r--libc/unistd/getopt-susv3.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/unistd/getopt-susv3.c b/libc/unistd/getopt-susv3.c
index d9ee18c43..70a616011 100644
--- a/libc/unistd/getopt-susv3.c
+++ b/libc/unistd/getopt-susv3.c
@@ -30,10 +30,14 @@
* Initial version of a SUSv3 compliant getopt().
*/
-#define _GNU_SOURCE
#include <unistd.h>
#include <string.h>
#include <stdio.h>
+#include <getopt.h>
+
+libc_hidden_proto(fprintf)
+libc_hidden_proto(strchr)
+libc_hidden_proto(stderr)
#ifdef __UCLIBC_MJN3_ONLY__
#warning TODO: Enable gettext awareness.
@@ -87,7 +91,7 @@ int getopt(int argc, char * const argv[], const char *optstring)
#endif
retval = (unsigned char) *o; /* Avoid problems for char val of -1. */
- if ((*o == ':') || !(s = __strchr(optstring, *o))) { /* Illegal option? */
+ if ((*o == ':') || !(s = strchr(optstring, *o))) { /* Illegal option? */
s = illegal;
retval = '?';
goto BAD;