summaryrefslogtreecommitdiff
path: root/security/libgcrypt
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2014-01-08 09:01:39 +0000
committerobache <obache@pkgsrc.org>2014-01-08 09:01:39 +0000
commit90ff33726d9600556e5342aaaf3dd13025ec6923 (patch)
tree62e3d9f27b7986bb2fbcfd8c2daaf29bc7bd4a17 /security/libgcrypt
parent157f7624ac15e4578fe4700ed9074aa0d3c574e4 (diff)
downloadpkgsrc-90ff33726d9600556e5342aaaf3dd13025ec6923.tar.gz
Use system supplied bswap32 and bswap64 macros on NetBSD.
Fixes build on NetBSD-5-i386 with builtin gcc.
Diffstat (limited to 'security/libgcrypt')
-rw-r--r--security/libgcrypt/distinfo3
-rw-r--r--security/libgcrypt/patches/patch-cipher_bithelp.h24
2 files changed, 26 insertions, 1 deletions
diff --git a/security/libgcrypt/distinfo b/security/libgcrypt/distinfo
index dc47756917e..9036198a9c5 100644
--- a/security/libgcrypt/distinfo
+++ b/security/libgcrypt/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.41 2014/01/07 17:18:29 richard Exp $
+$NetBSD: distinfo,v 1.42 2014/01/08 09:01:39 obache Exp $
SHA1 (libgcrypt-1.6.0.tar.bz2) = 43283c0b41c41e3d3bc13c2d8f937dfe2aaa1a77
RMD160 (libgcrypt-1.6.0.tar.bz2) = 33e4e45116a64999c4cd0d132a4a968612057f40
@@ -6,4 +6,5 @@ Size (libgcrypt-1.6.0.tar.bz2) = 2499149 bytes
SHA1 (patch-aa) = 7c46612f912d45dfd4ce4f4b510e72c00bd38585
SHA1 (patch-ab) = 6fac21daa26b7de3b13839d076f78a74400efce7
SHA1 (patch-ad) = 19345b7d164521d526a44eb3f1a465ff09d8266c
+SHA1 (patch-cipher_bithelp.h) = cac163417fdbb0cda7d787887b00bfb060740e60
SHA1 (patch-configure) = c4e10bdb7e00a44d507f5b964f3e71a63828cd0a
diff --git a/security/libgcrypt/patches/patch-cipher_bithelp.h b/security/libgcrypt/patches/patch-cipher_bithelp.h
new file mode 100644
index 00000000000..cc510f5ba27
--- /dev/null
+++ b/security/libgcrypt/patches/patch-cipher_bithelp.h
@@ -0,0 +1,24 @@
+$NetBSD: patch-cipher_bithelp.h,v 1.1 2014/01/08 09:01:39 obache Exp $
+
+* NetBSD has bswap32 and bswap64 as macros.
+
+--- cipher/bithelp.h.orig 2013-12-09 07:48:50.000000000 +0000
++++ cipher/bithelp.h
+@@ -40,7 +40,7 @@ static inline u32 ror(u32 x, int n)
+ provided helpers. */
+ #ifdef HAVE_BUILTIN_BSWAP32
+ # define bswap32 __builtin_bswap32
+-#else
++#elif !defined(__NetBSD__) && !defined(bswap32)
+ static inline u32 bswap32(u32 x)
+ {
+ return ((rol(x, 8) & 0x00ff00ffL) | (ror(x, 8) & 0xff00ff00L));
+@@ -50,7 +50,7 @@ static inline u32 bswap32(u32 x)
+ #ifdef HAVE_U64_TYPEDEF
+ # ifdef HAVE_BUILTIN_BSWAP64
+ # define bswap64 __builtin_bswap64
+-# else
++# elif !defined(__NetBSD__) && !defined(bswap64)
+ static inline u64 bswap64(u64 x)
+ {
+ return ((u64)bswap32(x) << 32) | (bswap32(x >> 32));