#include <stdint.h>
-#if defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD) || defined(MACOSX)
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
#include <machine/endian.h>
#if BYTE_ORDER == BIG_ENDIAN
#define BYTE_ORDER_BIG_ENDIAN
#if __BYTE_ORDER == __BIG_ENDIAN
#define BYTE_ORDER_BIG_ENDIAN
#endif // __BYTE_ORDER == __BIG_ENDIAN
-#endif // defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD)
+#endif // defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
#if defined(__LP64__)
#define BLOCKSIZE 2
CryptState_encrypt(&client->cryptState, data, buf, len);
-#if defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD) || defined(__APPLE__)
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
sendto(udpsock, buf, len + 4, 0, (struct sockaddr *)&client->remote_udp, client->remote_tcp.ss_len);
#else
sendto(udpsock, buf, len + 4, 0, (struct sockaddr *)&client->remote_udp, sizeof(struct sockaddr_storage));