Index: knot/src/libknot/util/endian.h =================================================================== --- knot.orig/src/libknot/util/endian.h 2014-05-24 14:03:58.309271227 +0400 +++ knot/src/libknot/util/endian.h 2014-05-24 18:36:14.148607917 +0400 @@ -46,6 +46,17 @@ # define htobe16(x) OSSwapHostToBigInt16(x) # define htobe32(x) OSSwapHostToBigInt32(x) # define htobe64(x) OSSwapHostToBigInt64(x) +#elif defined(__sun__) +# ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +# endif +# include +# define be16toh(x) ntohs(x) +# define be32toh(x) ntohl(x) +# define be64toh(x) ntohll(x) +# define htobe16(x) htons(x) +# define htobe32(x) htonl(x) +# define htobe64(x) htonll(x) #endif #endif /* _KNOT_ENDIAN_H_ */