diff --git a/cmake/OS_Detection.cmake b/cmake/OS_Detection.cmake index ff6953f20431d7eb49756659ce0bf532e3f8608f..f51b0c6f6d0d411de5e8188a5a3c80080c640766 100644 --- a/cmake/OS_Detection.cmake +++ b/cmake/OS_Detection.cmake @@ -47,8 +47,6 @@ if(UNIX) if (APPLE) add_definitions ("-DDAP_OS_DARWIN -DDARWIN -DDAP_OS_BSD") set(DARWIN ON) - else() - add_definitions ("-DDAP_OS_LINUX") endif() if (${CMAKE_SYSTEM_NAME} MATCHES "BSD" ) diff --git a/dap-sdk/core/include/portable_endian.h b/dap-sdk/core/include/portable_endian.h index 31c0809d913194de891b8498dc9a1a4d03fc7b5b..48134cb7ebd0a9e47150467a6512e4ea4bb019dc 100644 --- a/dap-sdk/core/include/portable_endian.h +++ b/dap-sdk/core/include/portable_endian.h @@ -50,14 +50,29 @@ # include <sys/endian.h> +#if !defined(be16toh) # define be16toh(x) betoh16(x) +#endif + +#if !defined(le16toh) # define le16toh(x) letoh16(x) +#endif +#if !defined(be32toh) # define be32toh(x) betoh32(x) +#endif + +#if !defined(le32toh) # define le32toh(x) letoh32(x) +#endif +#if !defined(be64toh) # define be64toh(x) betoh64(x) +#endif + +#if !defined(le64toh) # define le64toh(x) letoh64(x) +#endif #elif defined(__WINDOWS__)