From e85390f7994ea502d9910720cb5c00e73c2eb70b Mon Sep 17 00:00:00 2001 From: rodent Date: Mon, 8 Jul 2013 00:56:45 +0000 Subject: Fix build on SunOS. Add patch to define bswap_32(x) and bswap_64(x). --- textproc/cityhash/distinfo | 3 ++- textproc/cityhash/patches/patch-src_city.cc | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 textproc/cityhash/patches/patch-src_city.cc diff --git a/textproc/cityhash/distinfo b/textproc/cityhash/distinfo index 543d14c0055..2c350c03178 100644 --- a/textproc/cityhash/distinfo +++ b/textproc/cityhash/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.1 2013/07/02 11:22:21 rodent Exp $ +$NetBSD: distinfo,v 1.2 2013/07/08 00:56:45 rodent Exp $ SHA1 (cityhash-1.1.1.tar.gz) = 74342b9161bc762e4c14627a9281bef2d3cb5eed RMD160 (cityhash-1.1.1.tar.gz) = bac8c85686a8153afcc1defd3c93021b1da56f40 Size (cityhash-1.1.1.tar.gz) = 376456 bytes +SHA1 (patch-src_city.cc) = 9319333f53808ca6396876630c5d2c08bca15f79 diff --git a/textproc/cityhash/patches/patch-src_city.cc b/textproc/cityhash/patches/patch-src_city.cc new file mode 100644 index 00000000000..ff516d84577 --- /dev/null +++ b/textproc/cityhash/patches/patch-src_city.cc @@ -0,0 +1,18 @@ +$NetBSD: patch-src_city.cc,v 1.1 2013/07/08 00:56:45 rodent Exp $ + +Add support for SunOS. + +--- src/city.cc.orig 2013-06-17 19:45:57.000000000 +0000 ++++ src/city.cc +@@ -69,6 +69,11 @@ static uint32 UNALIGNED_LOAD32(const cha + #define bswap_64(x) bswap64(x) + #endif + ++#elif defined(__sun) ++#include ++#define bswap_32(x) htonl(x) ++#define bswap_64(x) htonll(x) ++ + #else + + #include -- cgit v1.2.3