[PATCH] fix _CLOEXEC and _NONBLOCK for mips in timerfd/inotify headers

Daniel Mierswa impulze at impulze.org
Tue Aug 2 00:44:31 UTC 2011


same fix as f87898ca4a7d4b7171779c06ff1f4848efeee431
this time triggered by systemd

Signed-off-by: Daniel Mierswa <impulze at impulze.org>
---
 libc/sysdeps/linux/common/sys/inotify.h |   10 ++++++++++
 libc/sysdeps/linux/common/sys/timerfd.h |   10 ++++++++++
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/libc/sysdeps/linux/common/sys/inotify.h b/libc/sysdeps/linux/common/sys/inotify.h
index dc4e19d..d8b4f5b 100644
--- a/libc/sysdeps/linux/common/sys/inotify.h
+++ b/libc/sysdeps/linux/common/sys/inotify.h
@@ -23,6 +23,15 @@
 
 
 /* Flags for the parameter of inotify_init1.  */
+#if defined __mips__
+enum
+  {
+    IN_CLOEXEC = 02000000,
+# define IN_CLOEXEC IN_CLOEXEC
+    IN_NONBLOCK = 0200
+# define IN_NONBLOCK IN_NONBLOCK
+  };
+#else
 enum
   {
     IN_CLOEXEC = 02000000,
@@ -30,6 +39,7 @@ enum
     IN_NONBLOCK = 04000
 #define IN_NONBLOCK IN_NONBLOCK
   };
+#endif
 
 
 /* Structure describing an inotify event.  */
diff --git a/libc/sysdeps/linux/common/sys/timerfd.h b/libc/sysdeps/linux/common/sys/timerfd.h
index c1bb06f..a13d332 100644
--- a/libc/sysdeps/linux/common/sys/timerfd.h
+++ b/libc/sysdeps/linux/common/sys/timerfd.h
@@ -23,6 +23,15 @@
 
 
 /* Bits to be set in the FLAGS parameter of `timerfd_create'.  */
+#if defined __mips__
+enum
+  {
+    TFD_CLOEXEC = 02000000,
+# define TFD_CLOEXEC TFD_CLOEXEC
+    TFD_NONBLOCK = 0200
+# define TFD_NONBLOCK TFD_NONBLOCK
+  };
+#else
 enum
   {
     TFD_CLOEXEC = 02000000,
@@ -30,6 +39,7 @@ enum
     TFD_NONBLOCK = 04000
 #define TFD_NONBLOCK TFD_NONBLOCK
   };
+#endif
 
 
 /* Bits to be set in the FLAGS parameter of `timerfd_settime'.  */
-- 
1.7.6



More information about the uClibc mailing list