9d84a81fe9
sysdeps/unix/sysv/linux/internal_accept4.S expects socket.S to be present if __NR_socketcall is defined (which it is on MIPS o32, even though there are separate syscalls as well) and __NR_accept4 isn't. MIPS does not have socket.S, since it uses separate syscalls, but though the accept4 syscall should be added soon present kernel headers do not have it. This patch creates a dummy internal_accept4.S for MIPS o32, and an accept4.c wrapper that undefines __NR_socketcall so that the main accept4.c falls back to the ENOSYS implementation if __NR_accept4 isn't defined; it doesn't seem worthwhile to have a special socketcall-based assembly implementation just for o32 on a few kernels in the range between accept4 being available via socketcall and the accept4 syscall being available.
33 lines
1.2 KiB
C
33 lines
1.2 KiB
C
/* 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>
|