aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2018-03-02 08:32:16 +0200
committerBen Hutchings <ben@decadent.org.uk>2020-03-28 21:42:54 +0000
commita2020fbd897e3c3d41c75294f4e43a0e07487822 (patch)
tree050c2899aea83ff0f874e11680ea4142561eb37e
parentbe47d99b3d05ea898412536d717a15d80cd8b68f (diff)
downloadklibc-a2020fbd897e3c3d41c75294f4e43a0e07487822.tar.gz
[klibc] dash: histedit: fix build with musl libc
[ dash commit 523d24878f5fb20c03210d10a919058a43fb5c31 ] musl libc defines the optreset BSD extension only in getopt.h. This fixes the following build failure: histedit.c: In function 'histcmd': histedit.c:220:2: error: 'optreset' undeclared (first use in this function) optreset = 1; optind = 1; /* initialize getopt */ ^~~~~~~~ Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--usr/dash/histedit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr/dash/histedit.c b/usr/dash/histedit.c
index 94465d785cc9e..f5c90aba873b8 100644
--- a/usr/dash/histedit.c
+++ b/usr/dash/histedit.c
@@ -39,6 +39,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <getopt.h>
/*
* Editline and history functions (and glue).
*/