lib/libc/compat/sys/compat_socket.c
http://www.minix3.org/ · C · 27 lines · 20 code · 6 blank · 1 comment · 3 complexity · 54d8291bf8b9519fe3047fbb0305b6e3 MD5 · raw file
- /* $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;
- }