aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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>