about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--include/unistd.h1
-rw-r--r--src/misc/getopt.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/unistd.h b/include/unistd.h
index b9b23a16..7bcbff94 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -176,6 +176,7 @@ long syscall(long, ...);
 int execvpe(const char *, char *const [], char *const []);
 int issetugid(void);
 int getentropy(void *, size_t);
+extern int optreset;
 #endif
 
 #ifdef _GNU_SOURCE
diff --git a/src/misc/getopt.c b/src/misc/getopt.c
index 864d52cd..c3f66995 100644
--- a/src/misc/getopt.c
+++ b/src/misc/getopt.c
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE
 #include <unistd.h>
 #include <wchar.h>
 #include <string.h>