chiark / gitweb /
util: get rid of warnings around assert_cc() macro
[elogind.git] / src / shared / missing.h
index d1ca135c5533e829f7cf2fa63f5c942b5d21d56f..2661285a227c39fb3d8f181fbbee960aac90ee31 100644 (file)
@@ -29,6 +29,8 @@
 #include <stdlib.h>
 #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);
@@ -300,13 +315,41 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle
 #endif
 
 #ifndef CIFS_MAGIC_NUMBER
-#define CIFS_MAGIC_NUMBER 0xFF534D42
+#  define CIFS_MAGIC_NUMBER 0xFF534D42
 #endif
 
 #ifndef TFD_TIMER_CANCEL_ON_SET
-#define TFD_TIMER_CANCEL_ON_SET (1 << 1)
+#  define TFD_TIMER_CANCEL_ON_SET (1 << 1)
 #endif
 
 #ifndef SO_REUSEPORT
-#define SO_REUSEPORT 15
+#  define SO_REUSEPORT 15
+#endif
+
+#ifndef EVIOCREVOKE
+#  define EVIOCREVOKE _IOW('E', 0x91, int)
+#endif
+
+#ifndef DRM_IOCTL_SET_MASTER
+#  define DRM_IOCTL_SET_MASTER _IO('d', 0x1e)
+#endif
+
+#ifndef DRM_IOCTL_DROP_MASTER
+#  define DRM_IOCTL_DROP_MASTER _IO('d', 0x1f)
+#endif
+
+#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