diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-11-15 01:28:16 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-11-15 01:28:16 +0000 |
commit | afa5bf6803f3716140291bc9f9c65fcada5862c4 (patch) | |
tree | 8d8ee8024611f4e539ea6d906c185e6f8030fd8c | |
parent | f6677b70e1e6379e09122ed1c705814173b83a53 (diff) |
as psm points out, we need to use bits/getopt.h in unistd.h since getopt.h wont exist if user disables the option
-rw-r--r-- | include/getopt.h | 1 | ||||
-rw-r--r-- | include/unistd.h | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/bits/getopt.h | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/include/getopt.h b/include/getopt.h index 4ea31a683..a682f9ca8 100644 --- a/include/getopt.h +++ b/include/getopt.h @@ -1,5 +1,4 @@ /* This file will not be installed if not using gnu getopt. */ -#include <features.h> #include <bits/getopt.h> diff --git a/include/unistd.h b/include/unistd.h index bb5cfd4bd..1ca923130 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -782,7 +782,7 @@ extern int setlogin (__const char *__name) __THROW __nonnull ((1)); arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. */ # define __need_getopt -# include <getopt.h> +# include <bits/getopt.h> #endif diff --git a/libc/sysdeps/linux/common/bits/getopt.h b/libc/sysdeps/linux/common/bits/getopt.h index 4a60e103e..a192c039b 100644 --- a/libc/sysdeps/linux/common/bits/getopt.h +++ b/libc/sysdeps/linux/common/bits/getopt.h @@ -20,6 +20,8 @@ #ifndef _GETOPT_H +#include <features.h> + #ifndef __need_getopt # define _GETOPT_H 1 #endif |