1/* $NetBSD: compat_ntp_gettime.c,v 1.1 2006/05/29 10:02:56 drochner Exp $ */
2
3#include <sys/cdefs.h>
4#if defined(LIBC_SCCS) && !defined(lint)
5__RCSID("$NetBSD: compat_ntp_gettime.c,v 1.1 2006/05/29 10:02:56 drochner Exp $");
6#endif /* LIBC_SCCS and not lint */
7
8#define __LIBC12_SOURCE__
9
10#include <errno.h>
11#include <sys/types.h>
12#include <sys/socket.h>
13#include <compat/sys/socket.h>
14
15__warn_references(socket,
16    "warning: reference to compatibility socket(); include <sys/socket.h> for correct reference")
17
18int
19socket(int domain, int type, int protocol)
20{
21	int res;
22
23	res = __socket30(domain, type, protocol);
24	if (errno == EAFNOSUPPORT)
25		errno = EPROTONOSUPPORT;
26	return res;
27}
28