X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fopt%2Fusage.c;h=12f44a48752e0e0d4e0d722c74b7513561334733;hb=d3d2242ba8d975f8d7ddaa0348953dfd6f45ffce;hp=26150ea8cd409e6c84d5a33067fd15932bccb4dc;hpb=c7a7fc0a1771394534cafaa7c30aa215631efc82;p=ccan diff --git a/ccan/opt/usage.c b/ccan/opt/usage.c index 26150ea8..12f44a48 100644 --- a/ccan/opt/usage.c +++ b/ccan/opt/usage.c @@ -4,7 +4,9 @@ #include #include /* Required on Solaris for struct winsize */ #endif +#if HAVE_SYS_UNISTD_H #include /* Required on Solaris for ioctl */ +#endif #include #include #include @@ -108,7 +110,7 @@ static char *add_desc(char *base, size_t *len, size_t *max, base = add_str(base, len, max, opt->names); off = strlen(opt->names); - if (opt->type == OPT_HASARG + if ((opt->type & OPT_HASARG) && !strchr(opt->names, ' ') && !strchr(opt->names, '=')) { base = add_str(base, len, max, " ");