chiark / gitweb /
missing.h: add some IFLA_* constants
authorTom Gundersen <teg@jklm.no>
Wed, 19 Feb 2014 14:45:54 +0000 (15:45 +0100)
committerTom Gundersen <teg@jklm.no>
Wed, 19 Feb 2014 14:50:24 +0000 (15:50 +0100)
These were added to the kernel between 3.5 and 3.9, let's not require such
recent kernels (yet).

src/libsystemd/sd-rtnl/rtnl-message.c
src/shared/missing.h

index eb4b445da7d55d5bdc3e3d281cf699c7a14808e9..5d4dc718101aae05000ee38b1262993e13b63200 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "util.h"
 #include "refcnt.h"
+#include "missing.h"
 
 #include "sd-rtnl.h"
 #include "rtnl-util.h"
index ac6f5bf6afdee84db171176f1618d340b0237d11..2661285a227c39fb3d8f181fbbee960aac90ee31 100644 (file)
@@ -30,6 +30,7 @@
 #include <unistd.h>
 #include <linux/oom.h>
 #include <linux/input.h>
+#include <linux/if_link.h>
 
 #ifdef HAVE_AUDIT
 #include <libaudit.h>
 #define IP_TRANSPARENT 19
 #endif
 
+#ifndef IFLA_CARRIER
+  #define IFLA_CARRIER 33
+  #ifndef IFLA_NUM_RX_QUEUES
+    #define IFLA_NUM_RX_QUEUES 32
+    #ifndef IFLA_NUM_TX_QUEUES
+      #define IFLA_NUM_TX_QUEUES 31
+      #ifndef IFLA_PROMISCUITY
+        #define IFLA_PROMISCUITY 30
+      #endif
+    #endif
+  #endif
+#endif
+
 #if !HAVE_DECL_PIVOT_ROOT
 static inline int pivot_root(const char *new_root, const char *put_old) {
         return syscall(SYS_pivot_root, new_root, put_old);