gluon-radv-filterd: Use _GNU_SOURCE by default

Both source files require the _GNU_SOURCE preprocessor. But for one file it is
defined in the source and for the other one in the Makefile. It is better
to have it in the Makefile to avoid that different source files in the same
project use different.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
Sven Eckelmann 2017-12-20 11:03:15 +01:00 committed by Jan-Philipp Litza
parent 93e2820f61
commit c9eccb9c47
No known key found for this signature in database
GPG Key ID: 1FB658053CE27196
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,9 @@
all: gluon-radv-filterd respondd.so all: gluon-radv-filterd respondd.so
CPPFLAGS += -D_GNU_SOURCE
gluon-radv-filterd: gluon-radv-filterd.c gluon-radv-filterd: gluon-radv-filterd.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -Wall -o $@ $^ $(LDLIBS) $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -Wall -o $@ $^ $(LDLIBS)
respondd.so: respondd.c respondd.so: respondd.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -fPIC -D_GNU_SOURCE -o $@ $^ $(LDLIBS) -lgluonutil $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -fPIC -o $@ $^ $(LDLIBS) -lgluonutil

View File

@ -23,7 +23,6 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#define _GNU_SOURCE
#include <errno.h> #include <errno.h>
#include <signal.h> #include <signal.h>
#include <stdarg.h> #include <stdarg.h>