missing: move timer related definition to missing_timerfd.h
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 6 Dec 2018 05:43:12 +0000 (06:43 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 6 Dec 2018 12:25:24 +0000 (13:25 +0100)
src/basic/meson.build
src/basic/missing.h
src/basic/missing_timerfd.h [new file with mode: 0644]

index 17282a9..f74bfb0 100644 (file)
@@ -112,6 +112,7 @@ basic_sources = files('''
         missing_socket.h
         missing_stat.h
         missing_syscall.h
+        missing_timerfd.h
         missing_type.h
         missing_vxcan.h
         mkdir-label.c
index 8d12cb3..79faeeb 100644 (file)
 #  define CIFS_MAGIC_NUMBER 0xFF534D42
 #endif
 
-#ifndef TFD_TIMER_CANCEL_ON_SET
-#  define TFD_TIMER_CANCEL_ON_SET (1 << 1)
-#endif
-
 #ifndef DRM_IOCTL_SET_MASTER
 #  define DRM_IOCTL_SET_MASTER _IO('d', 0x1e)
 #endif
 #include "missing_prctl.h"
 #include "missing_resource.h"
 #include "missing_socket.h"
+#include "missing_timerfd.h"
 #include "missing_type.h"
 
 #include "missing_syscall.h"
diff --git a/src/basic/missing_timerfd.h b/src/basic/missing_timerfd.h
new file mode 100644 (file)
index 0000000..6b04044
--- /dev/null
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
+#pragma once
+
+#include <sys/timerfd.h>
+
+#ifndef TFD_TIMER_CANCEL_ON_SET
+#define TFD_TIMER_CANCEL_ON_SET (1 << 1)
+#endif