b6cbf7203b
This patch imports the unmodified current version of NetBSD libc. The NetBSD includes are in /nbsd_include, while the libc code itself is split between lib/nbsd_libc and common/lib/libc.
27 lines
665 B
C
27 lines
665 B
C
/* $NetBSD: compat_socket.c,v 1.1 2006/06/26 21:23:56 mrg Exp $ */
|
|
|
|
#include <sys/cdefs.h>
|
|
#if defined(LIBC_SCCS) && !defined(lint)
|
|
__RCSID("$NetBSD: compat_socket.c,v 1.1 2006/06/26 21:23:56 mrg Exp $");
|
|
#endif /* LIBC_SCCS and not lint */
|
|
|
|
#define __LIBC12_SOURCE__
|
|
|
|
#include <errno.h>
|
|
#include <sys/types.h>
|
|
#include <sys/socket.h>
|
|
#include <compat/sys/socket.h>
|
|
|
|
__warn_references(socket,
|
|
"warning: reference to compatibility socket(); include <sys/socket.h> for correct reference")
|
|
|
|
int
|
|
socket(int domain, int type, int protocol)
|
|
{
|
|
int res;
|
|
|
|
res = __socket30(domain, type, protocol);
|
|
if (errno == EAFNOSUPPORT)
|
|
errno = EPROTONOSUPPORT;
|
|
return res;
|
|
}
|