From c09a21d87d3c015b6163ea03d5fd132a55405d34 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Fri, 10 Mar 2023 12:30:55 -0500 Subject: [PATCH] socket: Fix building without bsd-headers. --- nx/include/switch/runtime/devices/socket.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nx/include/switch/runtime/devices/socket.h b/nx/include/switch/runtime/devices/socket.h index 84028d12..0f7af7ab 100644 --- a/nx/include/switch/runtime/devices/socket.h +++ b/nx/include/switch/runtime/devices/socket.h @@ -46,8 +46,11 @@ int socketSslConnectionSetSocketDescriptor(SslConnection *c, int sockfd); /// Wrapper for \ref sslConnectionGetSocketDescriptor. Returns the output sockfd on success and -1 on error. int socketSslConnectionGetSocketDescriptor(SslConnection *c); +#ifdef _SOCKLEN_T_DECLARED +struct sockaddr; /// Wrapper for \ref sslConnectionSetDtlsSocketDescriptor. Returns the output sockfd on success and -1 on error. errno==ENOENT indicates that no sockfd was returned, this error must be ignored. int socketSslConnectionSetDtlsSocketDescriptor(SslConnection *c, int sockfd, const struct sockaddr *addr, socklen_t addrlen); +#endif /// Wrapper for \ref nifmRequestRegisterSocketDescriptor. Returns 0 on success and -1 on error. int socketNifmRequestRegisterSocketDescriptor(NifmRequest* r, int sockfd);