summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-08-03 17:00:12 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-08-03 17:00:12 +0000
commitf0d5809dac5eb4bfd620b4d539dfb8b0b483459e (patch)
tree7d9628411b31f610662fdac6b6fb90e372e7d57a
parentec2b860626bd4a66877f70865bf00c4bfe342acf (diff)
Merge changes between r8732 and r8757 from /fsf/glibc-2_10-branch.
git-svn-id: svn://svn.eglibc.org/branches/eglibc-2_10@8758 7b3dc134-2b1b-0410-93df-9e9f96275f8d
-rw-r--r--ports/ChangeLog.mips5
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips32/accept4.c32
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S2
3 files changed, 39 insertions, 0 deletions
diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips
index d5122b178..4c4c373d5 100644
--- a/ports/ChangeLog.mips
+++ b/ports/ChangeLog.mips
@@ -1,3 +1,8 @@
+2009-08-03 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips32/accept4.c,
+ sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S: New.
+
2009-07-20 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/unix/sysv/linux/mips/kernel-features.h: Define
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/accept4.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/accept4.c
new file mode 100644
index 000000000..98a41f96d
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/accept4.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Avoid accept4.c trying to use a definition based on the socketcall
+ syscall and internal_accept4.S. */
+
+#include <errno.h>
+#include <signal.h>
+#include <sys/socket.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <kernel-features.h>
+
+#undef __NR_socketcall
+
+#include <sysdeps/unix/sysv/linux/accept4.c>
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S b/ports/sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S
new file mode 100644
index 000000000..30434d733
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S
@@ -0,0 +1,2 @@
+/* MIPS does not have socket.S and the socketcall syscall should
+ generally be avoided, though it exists. */