diff options
Diffstat (limited to 'support/regex.c')
-rw-r--r-- | support/regex.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/support/regex.c b/support/regex.c index d6591e86..c8debb3a 100644 --- a/support/regex.c +++ b/support/regex.c @@ -18,8 +18,6 @@ <https://www.gnu.org/licenses/>. */ #ifndef _LIBC -# include <config.h> - # if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ # pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" # endif @@ -64,7 +62,14 @@ #undefs RE_DUP_MAX and sets it to the right value. */ #include <limits.h> -#include <regex.h> +#ifndef _LIBC +# define _GNU_SOURCE 1 +# include <regex.h> +# undef _GNU_SOURCE +# undef __USE_GNU +#else +# include <regex.h> +#endif #include "regex_internal.h" #include "regex_internal.c" |