]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ipnetns: fix build on older systems
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 17 Apr 2013 20:33:26 +0000 (13:33 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 17 Apr 2013 20:35:48 +0000 (13:35 -0700)
Debian Squeeze has out of date <sys/mount.h> without the required flags.

ip/ipnetns.c

index b047b979a83091903ff4bbcdc0f0718eec1d8636..c9bc20aeea52255c47aac93043e20983f64fde58 100644 (file)
 #define MNT_DETACH     0x00000002      /* Just detach from the tree */
 #endif /* MNT_DETACH */
 
+/* sys/mount.h may be out too old to have these */
+#ifndef MS_REC
+#define MS_REC         16384
+#endif
+
+#ifndef MS_SLAVE
+#define MS_SLAVE       (1 << 19)
+#endif
+
+#ifndef MS_SHARED
+#define MS_SHARED      (1 << 20)
+#endif
+
+
 #ifndef HAVE_SETNS
 static int setns(int fd, int nstype)
 {