diff --git a/adaptive_compress.c b/adaptive_compress.c index 29b62b4..9fbb2e6 100644 --- a/adaptive_compress.c +++ b/adaptive_compress.c @@ -26,7 +26,11 @@ #include #include #include +#if defined(sun) || defined(__sun) +#include +#else #include +#endif #include #include #include diff --git a/main.c b/main.c index ae33b7d..6d35a6a 100644 --- a/main.c +++ b/main.c @@ -35,7 +35,11 @@ #include #include #include +#if defined(sun) || defined(__sun) +#include +#else #include +#endif #include #include #include diff --git a/utils.h b/utils.h index 665ba6c..0321698 100644 --- a/utils.h +++ b/utils.h @@ -31,11 +31,14 @@ extern "C" { #endif +#if !defined(sun) && !defined(__sun) #define ulong_t u_long #define uchar_t u_char #define uint8_t u_char #define uint64_t u_int64_t #define uint32_t u_int32_t +#endif + #if ULONG_MAX == 4294967295UL # ifndef UINT64_C # define UINT64_C(n) n ## ULL @@ -57,12 +60,14 @@ typedef unsigned long uintptr_t; # define ntohll(x) (x) # endif #else +# if !defined(sun) && !defined (__sun) # ifndef htonll # define htonll(x) __bswap_64(x) # endif # ifndef ntohll # define ntohll(x) __bswap_64(x) # endif +# endif #endif