]> git.ozlabs.org Git - ccan/commitdiff
opt: fix libmusl compile.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 22 Nov 2017 05:44:02 +0000 (16:14 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 22 Nov 2017 05:44:02 +0000 (16:14 +1030)
Fixes: #63
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/opt/usage.c
tools/configurator/configurator.c

index 26150ea8cd409e6c84d5a33067fd15932bccb4dc..353d59bc48542d8423ddc3c437ed36146488ec37 100644 (file)
@@ -4,7 +4,9 @@
 #include <sys/ioctl.h>
 #include <sys/termios.h> /* Required on Solaris for struct winsize */
 #endif
+#if HAVE_SYS_UNISTD_H
 #include <sys/unistd.h> /* Required on Solaris for ioctl */
+#endif
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
index 6ec30bd6deb77596fde041983175f4eaa117741d..52c0243b4b99c7cdc6eaace528463d344743ef43 100644 (file)
@@ -315,6 +315,8 @@ static struct test tests[] = {
          "#include <sys/filio.h>\n" },
        { "HAVE_SYS_TERMIOS_H", OUTSIDE_MAIN, NULL, NULL,
          "#include <sys/termios.h>\n" },
+       { "HAVE_SYS_UNISTD_H", OUTSIDE_MAIN, NULL, NULL,
+         "#include <sys/unistd.h>\n" },
        { "HAVE_TYPEOF", INSIDE_MAIN, NULL, NULL,
          "__typeof__(argc) i; i = argc; return i == argc ? 0 : 1;" },
        { "HAVE_UNALIGNED_ACCESS", DEFINES_EVERYTHING|EXECUTE, NULL, NULL,