]> granicus.if.org Git - strace/commitdiff
futex: do not pretend <linux/futex.h> is included
authorEugene Syromyatnikov <evgsyr@gmail.com>
Tue, 30 Aug 2016 13:24:37 +0000 (16:24 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 30 Aug 2016 17:29:28 +0000 (17:29 +0000)
As configure.ac does not check for linux/futex.h, HAVE_LINUX_FUTEX_H is
never defined and therefore the inclusion of <linux/futex.h> guarded by
HAVE_LINUX_FUTEX_H makes no sense.

Moreover, <linux/futex.h> used to have an incorrect definition
of FUTEX_WAIT_BITSET_PRIVATE and FUTEX_WAKE_BITSET_PRIVATE:
since kernel commit v2.6.24-6320-gcd68998 where these definitions
were initially introduced and up to v2.6.31-7082-gf8d1e54 where they
were finally fixed these macros had been incorrectly defined via
FUTEX_WAIT_BITS and FUTEX_WAKE_BITS instead of FUTEX_WAIT_BITSET
and FUTEX_WAKE_BITSET, and these incorrect definitions made their way
into some distributions still in use.

* futex.c [HAVE_LINUX_FUTEX_H]: Remove.

futex.c

diff --git a/futex.c b/futex.c
index 9410b2a6a4fdde168ed91965c5f2dcc86a810498..d1b5a42cc1958a5e232c5dbaafa526b1930cbf3f 100644 (file)
--- a/futex.c
+++ b/futex.c
 
 #include "defs.h"
 
-#ifdef HAVE_LINUX_FUTEX_H
-# include <linux/futex.h>
-#endif
-
 #ifndef FUTEX_PRIVATE_FLAG
 # define FUTEX_PRIVATE_FLAG 128
 #endif