diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-07 11:48:03 (GMT) |
---|---|---|
committer | João Abecasis <joao@abecasis.name> | 2009-07-07 12:28:39 (GMT) |
commit | 2a834d39a69430058df3916392afab064ca941ee (patch) | |
tree | a1683c3a89a64b55361cf62115a5738c1971f4ff /src/corelib/kernel | |
parent | 9e2573bac15e39dc4f3545351ad87e221b4785e7 (diff) | |
download | Qt-2a834d39a69430058df3916392afab064ca941ee.zip Qt-2a834d39a69430058df3916392afab064ca941ee.tar.gz Qt-2a834d39a69430058df3916392afab064ca941ee.tar.bz2 |
try to fix the accept4 not being found in some older kernels
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qcore_unix.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp index 2549f77..b04abae 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) |