/* $NetBSD: compat_socket.c,v 1.1 2006/06/26 21:23:56 mrg Exp $ */ #include #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 #include #include #include __warn_references(socket, "warning: reference to compatibility socket(); include 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; }