[PATCH] futex: Remove <linux/futex.h> inclusion which is not used

Eugene Syromyatnikov evgsyr at gmail.com
Tue Aug 30 13:24:37 UTC 2016


configure script doesn't perform check for linux/futex.h presence, so
HAVE_LINUX_FUTEX_H is always undefined and inclusion of system header is
never performed. Moreover, this header had an incorrect definition of
FUTEX_WAIT_BITSET_PRIVATE/FUTEX_WAKE_BITSET_PRIVATE in the past: from
commit v2.6.24-6320-gcd68998 (where these definitions had been initially
introduced) up to v2.6.31-7082-gf8d1e54 (where they have be finally
fixed) these macros has been incorrectly defined via
FUTEX_WAIT_BITS/FUTEX_WAKE_BITS (not FUTEX_WAIT_BITSET/FUTEX_WAKE_BITSET)
and these incorrect definitions made their way in some distributions still
in use.

* futex.c: Remove conditional <linux/futex.h> inclusion: HAVE_LINUX_FUTEX_H
  is never defined and this is dead code, effectively.
---
 futex.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/futex.c b/futex.c
index 9410b2a..d1b5a42 100644
--- a/futex.c
+++ b/futex.c
@@ -30,10 +30,6 @@
 
 #include "defs.h"
 
-#ifdef HAVE_LINUX_FUTEX_H
-# include <linux/futex.h>
-#endif
-
 #ifndef FUTEX_PRIVATE_FLAG
 # define FUTEX_PRIVATE_FLAG 128
 #endif
-- 
1.7.10.4





More information about the Strace-devel mailing list