summaryrefslogtreecommitdiffstats
path: root/include/linux/time.h
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@redhat.com>2012-07-25 10:40:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 13:36:43 -0700
commit8ded2bbc1845e19c771eb55209aab166ef011243 (patch)
tree9ab400cdd407a9426fdfcc3432d7c0e19a0607ed /include/linux/time.h
parent4cb38750d49010ae72e718d46605ac9ba5a851b4 (diff)
downloadlinux-8ded2bbc1845e19c771eb55209aab166ef011243.tar.gz
linux-8ded2bbc1845e19c771eb55209aab166ef011243.tar.bz2
linux-8ded2bbc1845e19c771eb55209aab166ef011243.zip
posix_types.h: Cleanup stale __NFDBITS and related definitions
Recently, glibc made a change to suppress sign-conversion warnings in FD_SET (glibc commit ceb9e56b3d1). This uncovered an issue with the kernel's definition of __NFDBITS if applications #include <linux/types.h> after including <sys/select.h>. A build failure would be seen when passing the -Werror=sign-compare and -D_FORTIFY_SOURCE=2 flags to gcc. It was suggested that the kernel should either match the glibc definition of __NFDBITS or remove that entirely. The current in-kernel uses of __NFDBITS can be replaced with BITS_PER_LONG, and there are no uses of the related __FDELT and __FDMASK defines. Given that, we'll continue the cleanup that was started with commit 8b3d1cda4f5f ("posix_types: Remove fd_set macros") and drop the remaining unused macros. Additionally, linux/time.h has similar macros defined that expand to nothing so we'll remove those at the same time. Reported-by: Jeff Law <law@redhat.com> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> CC: <stable@vger.kernel.org> Signed-off-by: Josh Boyer <jwboyer@redhat.com> [ .. and fix up whitespace as per akpm ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/time.h')
-rw-r--r--include/linux/time.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/include/linux/time.h b/include/linux/time.h
index 179f4d6755fc..c81c5e40fcb5 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -257,14 +257,6 @@ static __always_inline void timespec_add_ns(struct timespec *a, u64 ns)
#endif /* __KERNEL__ */
-#define NFDBITS __NFDBITS
-
-#define FD_SETSIZE __FD_SETSIZE
-#define FD_SET(fd,fdsetp) __FD_SET(fd,fdsetp)
-#define FD_CLR(fd,fdsetp) __FD_CLR(fd,fdsetp)
-#define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp)
-#define FD_ZERO(fdsetp) __FD_ZERO(fdsetp)
-
/*
* Names of the interval timers, and structure
* defining a timer setting: