diff -Naur iproute2-3.14.0.orig/ip/Makefile iproute2-3.14.0/ip/Makefile
--- iproute2-3.14.0.orig/ip/Makefile	2014-05-14 21:44:18.263598064 -0400
+++ iproute2-3.14.0/ip/Makefile	2014-05-14 21:45:23.075599535 -0400
@@ -13,6 +13,11 @@
 
 ifeq ($(IP_CONFIG_SETNS),y)
 	CFLAGS += -DHAVE_SETNS
+else
+HAVE_SETNS=$(shell CC=$(CC) sh ../test_setns 2>/dev/null)
+ifneq (,$(HAVE_SETNS))
+	CFLAGS += -DHAVE_SETNS
+endif
 endif
 
 ALLOBJ=$(IPOBJ) $(RTMONOBJ)
diff -Naur iproute2-3.14.0.orig/test_setns iproute2-3.14.0/test_setns
--- iproute2-3.14.0.orig/test_setns	1969-12-31 19:00:00.000000000 -0500
+++ iproute2-3.14.0/test_setns	2014-05-14 21:45:23.075599535 -0400
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+have=yes
+tmpfile=$(mktemp)
+echo 'int main(void){ (void)setns(0,0);return 0;}' > ${tmpfile}.c
+$CC -o ${tmpfile} ${tmpfile}.c || have=
+rm -f ${tmpfile} ${tmpfile}.c
+echo $have
