summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-07-07 13:48:03 +0200
committerJoão Abecasis <joao@abecasis.name>2009-07-07 14:28:39 +0200
commit2a834d39a69430058df3916392afab064ca941ee (patch)
treea1683c3a89a64b55361cf62115a5738c1971f4ff /src
parent9e2573bac15e39dc4f3545351ad87e221b4785e7 (diff)
try to fix the accept4 not being found in some older kernels
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qcore_unix.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp
index 2549f77e3c..b04abae78f 100644
--- a/src/corelib/kernel/qcore_unix.cpp
+++ b/src/corelib/kernel/qcore_unix.cpp
@@ -138,22 +138,32 @@ static inline int syscall(...) { errno = ENOSYS; return -1;}
# define __NR_dup3 330
# define __NR_pipe2 331
# elif defined(__x86_64__)
-# define __NR_accept4 288
# define __NR_dup3 292
# define __NR_pipe2 293
# elif defined(__ia64__)
-# define __NR_accept4 -1
# define __NR_dup3 1316
# define __NR_pipe2 1317
# else
// set the syscalls to absurd numbers so that they'll cause ENOSYS errors
-# warning "Please port the pipe2/dup3/accept4 code to this platform"
-# define __NR_accept4 -1
+# warning "Please port the pipe2/dup3 code to this platform"
# define __NR_dup3 -1
# define __NR_pipe2 -1
# endif
# endif
+# if !defined(__NR_socketcall) && !defined(__NR_accept4)
+# if defined(__x86_64__)
+# define __NR_accept4 288
+# elif defined(__ia64__)
+// not assigned yet to IA-64
+# define __NR_accept4 -1
+# else
+// set the syscalls to absurd numbers so that they'll cause ENOSYS errors
+# warning "Please port the accept4 code to this platform"
+# define __NR_accept4 -1
+# endif
+# endif
+
QT_BEGIN_NAMESPACE
namespace QtLibcSupplement {
int pipe2(int pipes[], int flags)