summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2012-05-29 20:18:28 +0000
committerjoerg <joerg@pkgsrc.org>2012-05-29 20:18:28 +0000
commit0dd0a601043c24d2ca482745677bf34ea8b40ae1 (patch)
tree257473984edb000e8b7092a82420a60d8ac4d2f3 /databases
parentf84ee98eb0bab68b22e74c72745dcfd620f4c92c (diff)
downloadpkgsrc-0dd0a601043c24d2ca482745677bf34ea8b40ae1.tar.gz
Fix build with Clang.
Diffstat (limited to 'databases')
-rw-r--r--databases/db4/distinfo3
-rw-r--r--databases/db4/patches/patch-dbinc_atomic.h38
2 files changed, 40 insertions, 1 deletions
diff --git a/databases/db4/distinfo b/databases/db4/distinfo
index 93202405306..9a5f225beed 100644
--- a/databases/db4/distinfo
+++ b/databases/db4/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.38 2011/02/04 12:26:01 obache Exp $
+$NetBSD: distinfo,v 1.39 2012/05/29 20:18:28 joerg Exp $
SHA1 (db-4.8.30.tar.gz) = ab36c170dda5b2ceaad3915ced96e41c6b7e493c
RMD160 (db-4.8.30.tar.gz) = dd2fcd4c9b857a91e2f491fd4fadb0c51b993a9c
@@ -7,3 +7,4 @@ SHA1 (patch-aa) = 1004feec022eefbf3fd57b6d9af99edc5a2bf17a
SHA1 (patch-ab) = 8f9ecc47527d338e28ee1ce71e694eaf2bdceb92
SHA1 (patch-ac) = 045a3b83b9c6c164382ec546b06ae248620552cf
SHA1 (patch-ae) = 43e574154de93dba60392b09d6ebddbca1036849
+SHA1 (patch-dbinc_atomic.h) = ff60e3af41ac1b000ebccc91bc673adde5c7463b
diff --git a/databases/db4/patches/patch-dbinc_atomic.h b/databases/db4/patches/patch-dbinc_atomic.h
new file mode 100644
index 00000000000..1ac36262a8a
--- /dev/null
+++ b/databases/db4/patches/patch-dbinc_atomic.h
@@ -0,0 +1,38 @@
+$NetBSD: patch-dbinc_atomic.h,v 1.1 2012/05/29 20:18:28 joerg Exp $
+
+Don't define inline functions in the protected namespace.
+This conflicts with Clang builtins.
+
+--- dbinc/atomic.h.orig 2012-05-24 10:38:34.000000000 +0000
++++ dbinc/atomic.h
+@@ -141,11 +141,7 @@ typedef LONG volatile *interlocked_val;
+
+ #if defined(HAVE_ATOMIC_X86_GCC_ASSEMBLY)
+ /* x86/x86_64 gcc */
+-#define atomic_inc(env, p) __atomic_inc(p)
+-#define atomic_dec(env, p) __atomic_dec(p)
+-#define atomic_compare_exchange(env, p, o, n) \
+- __atomic_compare_exchange((p), (o), (n))
+-static inline int __atomic_inc(db_atomic_t *p)
++static inline int atomic_inc(ENV *unused, db_atomic_t *p)
+ {
+ int temp;
+
+@@ -156,7 +152,7 @@ static inline int __atomic_inc(db_atomic
+ return (temp + 1);
+ }
+
+-static inline int __atomic_dec(db_atomic_t *p)
++static inline int atomic_dec(ENV *unused, db_atomic_t *p)
+ {
+ int temp;
+
+@@ -176,7 +172,7 @@ static inline int __atomic_dec(db_atomic
+ * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+ * which configure could be changed to use.
+ */
+-static inline int __atomic_compare_exchange(
++static inline int atomic_compare_exchange(ENV *unused,
+ db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+ atomic_value_t was;