Fix switch compilation
This commit is contained in:
parent
f1aa29634b
commit
67af723087
@ -70,7 +70,9 @@
|
|||||||
#include <sys/types.h> /* FD_SETSIZE socklen_t */
|
#include <sys/types.h> /* FD_SETSIZE socklen_t */
|
||||||
#include <sys/select.h> /* FD_ZERO FD_SET fd_set select(2) */
|
#include <sys/select.h> /* FD_ZERO FD_SET fd_set select(2) */
|
||||||
#include <sys/socket.h> /* AF_INET AF_INET6 AF_UNIX struct sockaddr struct sockaddr_in struct sockaddr_in6 socket(2) */
|
#include <sys/socket.h> /* AF_INET AF_INET6 AF_UNIX struct sockaddr struct sockaddr_in struct sockaddr_in6 socket(2) */
|
||||||
#if defined(AF_UNIX)
|
#ifdef __SWITCH__
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#elif defined(AF_UNIX)
|
||||||
#include <sys/un.h> /* struct sockaddr_un */
|
#include <sys/un.h> /* struct sockaddr_un */
|
||||||
#endif
|
#endif
|
||||||
#include <fcntl.h> /* F_SETFD F_GETFL F_SETFL O_NONBLOCK fcntl(2) */
|
#include <fcntl.h> /* F_SETFD F_GETFL F_SETFL O_NONBLOCK fcntl(2) */
|
||||||
@ -851,7 +853,7 @@ DNS_NOTUSED static size_t dns_strnlcpy(char *dst, size_t lim, const char *src, s
|
|||||||
} /* dns_strnlcpy() */
|
} /* dns_strnlcpy() */
|
||||||
|
|
||||||
|
|
||||||
#if (defined AF_UNIX && !defined _WIN32)
|
#if (defined AF_UNIX && !defined _WIN32 && !defined(__SWITCH__))
|
||||||
#define DNS_HAVE_SOCKADDR_UN 1
|
#define DNS_HAVE_SOCKADDR_UN 1
|
||||||
#else
|
#else
|
||||||
#define DNS_HAVE_SOCKADDR_UN 0
|
#define DNS_HAVE_SOCKADDR_UN 0
|
||||||
@ -9322,7 +9324,7 @@ enum dns_rcode dns_ircode(const char *name) {
|
|||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !_WIN32
|
#if !_WIN32 && !defined(__SWITCH__)
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -9389,7 +9391,7 @@ DNS_NORETURN static void panic(const char *fmt, ...) {
|
|||||||
vfprintf(stderr, fmt, ap);
|
vfprintf(stderr, fmt, ap);
|
||||||
|
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
#else
|
#elif !defined(__SWITCH__)
|
||||||
verrx(EXIT_FAILURE, fmt, ap);
|
verrx(EXIT_FAILURE, fmt, ap);
|
||||||
#endif
|
#endif
|
||||||
} /* panic() */
|
} /* panic() */
|
||||||
|
Loading…
Reference in New Issue
Block a user