blob: 31a6dc7a531d8db7434bf7d77904c236898b71a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/* $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;
}
|