Skip to content

Commit 07acd46

Browse files
committed
Set _GNU_SOURCE
This is set implicitly by some compiler invocations. Respect $CC as the Makefile does
1 parent 1d7e1f3 commit 07acd46

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Makefile.linux

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CPPFLAGS += -D_LINUX_PORT -Imissing
1+
CPPFLAGS += -D_GNU_SOURCE -D_LINUX_PORT -Imissing
22
MANPREFIX ?= ${PREFIX}/share/man
33
EXTRA_SRC = missing/kqueue_inotify.c
44

Makefile.linux-compat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CPPFLAGS += -D_LINUX_PORT -Imissing
1+
CPPFLAGS += -D_GNU_SOURCE -D_LINUX_PORT -Imissing
22
MANPREFIX ?= ${PREFIX}/share/man
33
EXTRA_SRC = missing/strlcpy.c missing/kqueue_inotify.c
44

configure

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/bin/sh
22

33
test_libc_features() {
4-
2>/dev/null gcc -xc - <<-EOF
4+
CFLAGS="-D_GNU_SOURCE"
5+
: ${CC:=cc}
6+
2>/dev/null $CC -xc $CFLAGS -o /dev/null - <<-EOF
57
#include <string.h>
68
int main(void) {
79
char dst[4];

0 commit comments

Comments
 (0)