chiark / gitweb /
util: get rid of warnings around assert_cc() macro
[elogind.git] / src / shared / missing.h
index 4e62100030b0b58438f955cea102f406ba150328..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);
@@ -324,6 +338,18 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle
 #  define DRM_IOCTL_DROP_MASTER _IO('d', 0x1f)
 #endif
 
-#ifndef TMP_MAX
-# define TMP_MAX 238328
+#if defined(__i386__) || defined(__x86_64__)
+
+/* The precise definition of __O_TMPFILE is arch specific, so let's
+ * just define this on x86 where we know the value. */
+
+#ifndef __O_TMPFILE
+#define __O_TMPFILE     020000000
+#endif
+
+/* a horrid kludge trying to make sure that this will fail on old kernels */
+#ifndef O_TMPFILE
+#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
+#endif
+
 #endif