]>
git.ipfire.org Git - thirdparty/shairport-sync.git/blob - definitions.h
4 #include <sys/socket.h>
8 #if defined(__APPLE__) && defined(__MACH__)
9 /* Apple OSX and iOS (Darwin). ------------------------------ */
10 #include <TargetConditionals.h>
11 #if TARGET_OS_MAC == 1
13 #define COMPILE_FOR_OSX 1
17 #if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__)
18 #define COMPILE_FOR_LINUX_AND_FREEBSD_AND_CYGWIN_AND_OPENBSD 1
21 #if defined(__linux__)
22 #define COMPILE_FOR_LINUX 1
25 #if defined(__FreeBSD__) || defined(__OpenBSD__)
26 #define COMPILE_FOR_BSD 1
29 #if defined(__FreeBSD__)
30 #define COMPILE_FOR_FREEBSD 1
33 // struct sockaddr_in6 is bigger than struct sockaddr. derp
35 #define SOCKADDR struct sockaddr_storage
36 #define SAFAMILY ss_family
38 #define SOCKADDR struct sockaddr
39 #define SAFAMILY sa_family
42 #endif // _DEFINITIONS_H