summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-07-04 22:35:03 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-07-04 22:35:03 +0200
commit05c8a23ec8725815b54f9d73c184a70e491c2f20 (patch)
tree3bbff60e29a39acc133a56fbc4361a2f47c87c8b
parente32cc549d19a0fb59febf8487d604bf4a7f774b5 (diff)
downloadnetlink-notify-05c8a23ec8725815b54f9d73c184a70e491c2f20.tar.gz
netlink-notify-05c8a23ec8725815b54f9d73c184a70e491c2f20.tar.zst
add -Werror to CFLAGS and fix includes
-rw-r--r--Makefile2
-rw-r--r--netlink-notify.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index bd6746c..56248bf 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# netlink-notify - Notify about netlink changes
CC := gcc
-CFLAGS += -O2 -Wall
+CFLAGS += -O2 -Wall -Werror
CFLAGS += $(shell pkg-config --cflags --libs libnotify)
VERSION = $(shell git describe --tags --long)
diff --git a/netlink-notify.c b/netlink-notify.c
index 27f9986..9bd22e4 100644
--- a/netlink-notify.c
+++ b/netlink-notify.c
@@ -17,6 +17,10 @@
#include <linux/if.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
+/* we have to undefine this before including net/if.h to
+ * notget redefined structs, etc. */
+#undef __USE_MISC
+#include <net/if.h>
#include <netinet/in.h>
#include <sys/socket.h>