This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix accept4 on architectures other than i?86/x86_64
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 21 May 2009 21:49:38 +0200
- Subject: [PATCH] Fix accept4 on architectures other than i?86/x86_64
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
288 is x86_64 specific, so either has to be surrounded by #ifdef __x86_64__,
moved into linux/x86_64/ subdir or better yet not defined at all, it is
kernel headers responsibility to define it.
Without this nscd is very much broken on ppc, because 288 is mknodat, which
will return -EFAULT with the arguments nscd calls it.
2009-05-21 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/accept4.c (__NR_accept4): Don't define.
diff --git a/sysdeps/unix/sysv/linux/accept4.c b/sysdeps/unix/sysv/linux/accept4.c
index 97f7b8c..4be710f 100644
--- a/sysdeps/unix/sysv/linux/accept4.c
+++ b/sysdeps/unix/sysv/linux/accept4.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2008.
@@ -24,8 +24,6 @@
#include <sysdep-cancel.h>
#include <sys/syscall.h>
-#define __NR_accept4 288
-
#ifdef __NR_accept4
int
Jakub