FD_SET and FORTIFY_SOURCE
KOSAKI Motohiro
kosaki.motohiro@gmail.com
Mon Mar 25 01:58:00 GMT 2013
> 1. only turn on __FD_ELT check when running on hurd.
> 2. only turn on __FD_ELT check when defined some specific macro. (e.g.
> likes darwin,
> but disable by default)
> 2-2. make FORTIFY_SOURCE variant and check POSIX compliance if enabled.
> 3. provide select_large_fdset() likes solaris. (I strongly don't
> recommend. all application
> need to modify and recompilation)
>
> What do you think?
Attached simplest patch that just disable __FD_ELT parameter check when running Linux.
-------------- next part --------------
commit 6fd535d2a6b4d70c79c408dce0440a2d4cb37673
Author: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Date: Sun Mar 24 21:55:40 2013 -0400
[PATCH] Don't enable FD_* argument check when running on Linux.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
diff --git a/ChangeLog b/ChangeLog
index e7991c9..ef9d4f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-24 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * misc/sys/select.h: Don't enable FD_* argument check
+ when running on Linux.
+
2013-01-09 Anton Blanchard <anton@samba.org>
* sysdeps/unix/sysv/linux/powerpc/sched_getcpu.c: New file.
diff --git a/misc/sys/select.h b/misc/sys/select.h
index 21351fe..37a1b04 100644
--- a/misc/sys/select.h
+++ b/misc/sys/select.h
@@ -124,7 +124,7 @@ extern int pselect (int __nfds, fd_set *__restrict __readfds,
/* Define some inlines helping to catch common problems. */
-#if __USE_FORTIFY_LEVEL > 0 && defined __GNUC__
+#if __USE_FORTIFY_LEVEL > 0 && defined __GNUC__ && !defined(__linux__)
# include <bits/select2.h>
#endif
More information about the Libc-alpha
mailing list