aboutsummaryrefslogtreecommitdiff
path: root/lib/portability.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-11-21 14:09:23 -0800
committerRob Landley <rob@landley.net>2019-11-22 06:54:31 -0600
commitc77b66455762f42bb824c1aa8cc60e7f4d44bdab (patch)
tree72a44d951b912d43290ef0ee6bc705c2da0f2876 /lib/portability.h
parent176c6fa4580571d262434ca2d610c860d30cf876 (diff)
downloadtoybox-c77b66455762f42bb824c1aa8cc60e7f4d44bdab.tar.gz
Add getopt(1).
Includes new tests.
Diffstat (limited to 'lib/portability.h')
-rw-r--r--lib/portability.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/portability.h b/lib/portability.h
index b586c132..481e3f04 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -105,6 +105,9 @@ static inline char *basename(char *path) { return __xpg_basename(path); }
char *strcasestr(const char *haystack, const char *needle);
#endif // defined(glibc)
+// getopt_long(), getopt_long_only(), and struct option.
+#include <getopt.h>
+
#if !defined(__GLIBC__)
// POSIX basename.
#include <libgen.h>