diff options
author | Baruch Siach <baruch@tkos.co.il> | 2018-03-02 08:32:16 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-03-10 16:01:43 +0800 |
commit | 523d24878f5fb20c03210d10a919058a43fb5c31 (patch) | |
tree | ae546b812b3750f01fdc93edd4647d4b1d0e5c72 /src | |
parent | expand: Remove dependency on fmatch.h if it does not exit (diff) | |
download | dash-523d24878f5fb20c03210d10a919058a43fb5c31.tar.gz dash-523d24878f5fb20c03210d10a919058a43fb5c31.zip |
histedit: fix build with musl libc
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/histedit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/histedit.c b/src/histedit.c index 94465d7..f5c90ab 100644 --- a/src/histedit.c +++ b/src/histedit.c @@ -39,6 +39,7 @@ #include <stdio.h> #include <stdlib.h> #include <unistd.h> +#include <getopt.h> /* * Editline and history functions (and glue). */ |