summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-07-15 19:18:39 +0000
committerMike Frysinger <vapier@gentoo.org>2007-07-15 19:18:39 +0000
commitc34cb86334ce23534f35987b1ebed8c9f2194617 (patch)
tree92799192662f03934c2e7340abd86c188199120a /sys-libs
parent Bump, #185407 thanks to Kilburn Abrahams (diff)
downloadgentoo-2-c34cb86334ce23534f35987b1ebed8c9f2194617.tar.gz
gentoo-2-c34cb86334ce23534f35987b1ebed8c9f2194617.tar.bz2
gentoo-2-c34cb86334ce23534f35987b1ebed8c9f2194617.zip
if some __NR_* defines are missing, stub them out so we can keep our C-only approach #185197
(Portage version: 2.1.3_rc8)
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/glibc/files/2.6/glibc-2.6-gentoo-stack_chk_fail.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sys-libs/glibc/files/2.6/glibc-2.6-gentoo-stack_chk_fail.c b/sys-libs/glibc/files/2.6/glibc-2.6-gentoo-stack_chk_fail.c
index b18b8669468f..c696993477c2 100644
--- a/sys-libs/glibc/files/2.6/glibc-2.6-gentoo-stack_chk_fail.c
+++ b/sys-libs/glibc/files/2.6/glibc-2.6-gentoo-stack_chk_fail.c
@@ -122,10 +122,20 @@
#endif
/* Define DO_SOCKET/DO_CONNECT functions to deal with socketcall vs socket/connect */
-#ifdef __NR_socketcall
-# define USE_OLD_SOCKETCALL 1
-#else
+#if defined(__NR_socket) && defined(__NR_connect)
# define USE_OLD_SOCKETCALL 0
+#else
+# define USE_OLD_SOCKETCALL 1
+#endif
+/* stub out the __NR_'s so we can let gcc optimize away dead code */
+#ifndef __NR_socketcall
+# define __NR_socketcall 0
+#endif
+#ifndef __NR_socket
+# define __NR_socket 0
+#endif
+#ifndef __NR_connect
+# define __NR_connect 0
#endif
#define DO_SOCKET(result, domain, type, protocol) \
do { \