Add TFD_TIMER_CANCEL_ON_SET to sys/timerfd.h

Message ID alpine.DEB.2.20.1702221801560.8704@digraph.polyomino.org.uk
State Committed
Headers

Commit Message

Joseph Myers Feb. 22, 2017, 6:02 p.m. UTC
  In Linux 4.10, timerfd constants moved to a new uapi header, which
showed up that glibc's sys/timerfd.h is missing the old flag
TFD_TIMER_CANCEL_ON_SET.  This patch adds that flag to glibc's header.

Tested for x86_64.

2017-02-22  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/unix/sysv/linux/sys/timerfd.h (TFD_TIMER_CANCEL_ON_SET):
	New enum constant and macro.
  

Comments

Mike Frysinger Feb. 22, 2017, 7:22 p.m. UTC | #1
On 22 Feb 2017 18:02, Joseph Myers wrote:
> In Linux 4.10, timerfd constants moved to a new uapi header, which
> showed up that glibc's sys/timerfd.h is missing the old flag
> TFD_TIMER_CANCEL_ON_SET.  This patch adds that flag to glibc's header.

ok!
-mike
  

Patch

diff --git a/sysdeps/unix/sysv/linux/sys/timerfd.h b/sysdeps/unix/sysv/linux/sys/timerfd.h
index 6899b5e..9811afe 100644
--- a/sysdeps/unix/sysv/linux/sys/timerfd.h
+++ b/sysdeps/unix/sysv/linux/sys/timerfd.h
@@ -28,8 +28,10 @@ 
 /* Bits to be set in the FLAGS parameter of `timerfd_settime'.  */
 enum
   {
-    TFD_TIMER_ABSTIME = 1 << 0
+    TFD_TIMER_ABSTIME = 1 << 0,
 #define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME
+    TFD_TIMER_CANCEL_ON_SET = 1 << 1
+#define TFD_TIMER_CANCEL_ON_SET TFD_TIMER_CANCEL_ON_SET
   };