chiark / gitweb /
071 release
[elogind.git] / udev_libc_wrapper.h
index a12af64c24ff34f72ff63987ed6b9d7ee8ae81fa..6f8c8f24c7eb4693792f941c97bcbe1338d7cdf7 100644 (file)
 #ifndef _UDEV_LIBC_WRAPPER_H_
 #define _UDEV_LIBC_WRAPPER_H_
 
+#include <string.h>
+#include <unistd.h>
+#include <linux/types.h>
+
+/* needed for our signal handlers to work */
 #undef asmlinkage
 #ifdef __i386__
 #define asmlinkage     __attribute__((regparm(0)))
@@ -29,6 +34,7 @@
 #define asmlinkage
 #endif
 
+/* headers are broken on some lazy platforms */
 #ifndef __FD_SET
 #define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
 #endif
 #define __FD_ZERO(set) ((void) memset ((void*) (set), 0, sizeof (fd_set)))
 #endif
 
+/* missing in some lazy distros */
 #ifndef NETLINK_KOBJECT_UEVENT
 #define NETLINK_KOBJECT_UEVENT 15
 #endif
 
-#include <string.h>
+#ifndef SO_RCVBUFFORCE
+#define SO_RCVBUFFORCE 33
+#endif
 
 #ifdef __KLIBC__
 static inline int clearenv(void)