diff options
-rw-r--r-- | lib/libc/stdlib/getopt_long.c | 2 | ||||
-rw-r--r-- | tools/build/Makefile | 12 | ||||
-rw-r--r-- | tools/build/regex.h | 4 |
3 files changed, 16 insertions, 2 deletions
diff --git a/lib/libc/stdlib/getopt_long.c b/lib/libc/stdlib/getopt_long.c index 474290f..ef1d8e9 100644 --- a/lib/libc/stdlib/getopt_long.c +++ b/lib/libc/stdlib/getopt_long.c @@ -42,8 +42,6 @@ __RCSID("$NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $"); #endif /* LIBC_SCCS and not lint */ -#include "namespace.h" - #include <assert.h> #include <err.h> #include <errno.h> diff --git a/tools/build/Makefile b/tools/build/Makefile index fee9e40..fa5bae2 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -51,6 +51,18 @@ SRCS+= progname.c SRCS+= strtofflags.c .endif +# Lot of tools need <getopt.h> and getopt_long(3). +.if !exists(/usr/include/getopt.h) +INCS+= getopt.h +.PATH: ${.CURDIR}/../../lib/libc/stdlib +SRCS+= getopt_long.c +.endif + +# Some tools depend on a new <regex.h> not requiring <sys/types.h>. +.if ${BOOTSTRAPPING} < 500042 +INCS+= regex.h +.endif + .if empty(SRCS) SRCS= dummy.c .endif diff --git a/tools/build/regex.h b/tools/build/regex.h new file mode 100644 index 0000000..3de6076 --- /dev/null +++ b/tools/build/regex.h @@ -0,0 +1,4 @@ +/* $FreeBSD$ */ + +#include <sys/types.h> +#include "/usr/include/regex.h" |