diff options
author | Sven Gothel <[email protected]> | 2021-02-08 15:58:31 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-02-08 15:58:31 +0100 |
commit | 226a1ebe8f0c0ae08d30ea5f5569aa73ac54e58b (patch) | |
tree | 4f7e30668b5bf764f298780550e4d5f903bfade6 /api | |
parent | 2686196ddd205d14b244592f394d278d375afca7 (diff) |
linux_kernel_types.hpp: Allow !__linux__ compilation
Diffstat (limited to 'api')
-rw-r--r-- | api/direct_bt/linux_kernel_types.hpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/api/direct_bt/linux_kernel_types.hpp b/api/direct_bt/linux_kernel_types.hpp index 6b089286..247fddb3 100644 --- a/api/direct_bt/linux_kernel_types.hpp +++ b/api/direct_bt/linux_kernel_types.hpp @@ -30,11 +30,12 @@ #include "BTAddress.hpp" -/* <sys/param.h> defines __u64 _le64 and _be64 on aarch64 */ -extern "C" { - #include <sys/param.h> -} - +#if defined(__linux__) + /* <sys/param.h> defines __u64 _le64 and _be64 on aarch64 */ + extern "C" { + #include <sys/param.h> + } +#endif /* defined(__linux__) */ typedef uint8_t __u8; typedef int8_t __s8; @@ -45,10 +46,10 @@ typedef uint32_t __u32; typedef uint32_t __le32; typedef uint32_t __be32; -#if !defined(__aarch64__) && !defined(__arm64__) -typedef uint64_t __u64; -typedef uint64_t __le64; -typedef uint64_t __be64; +#if !defined(__linux__) || ( !defined(__aarch64__) && !defined(__arm64__) ) + typedef uint64_t __u64; + typedef uint64_t __le64; + typedef uint64_t __be64; #endif typedef direct_bt::EUI48 bdaddr_t; |