summaryrefslogtreecommitdiff
path: root/sysutils/dbus/patches/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/dbus/patches/patch-ab')
-rw-r--r--sysutils/dbus/patches/patch-ab27
1 files changed, 17 insertions, 10 deletions
diff --git a/sysutils/dbus/patches/patch-ab b/sysutils/dbus/patches/patch-ab
index 677f83f0c38..2f9a302093b 100644
--- a/sysutils/dbus/patches/patch-ab
+++ b/sysutils/dbus/patches/patch-ab
@@ -1,12 +1,12 @@
-$NetBSD: patch-ab,v 1.11 2008/06/14 10:24:52 tnn Exp $
+$NetBSD: patch-ab,v 1.12 2008/06/19 01:56:44 bjs Exp $
---- dbus/dbus-sysdeps-unix.c.orig 2008-04-04 17:24:08.000000000 +0200
+--- dbus/dbus-sysdeps-unix.c.orig 2008-04-04 11:24:08.000000000 -0400
+++ dbus/dbus-sysdeps-unix.c
@@ -35,6 +35,9 @@
#include "dbus-list.h"
#include "dbus-credentials.h"
-+#ifdef DBUS_USE_NETBSD_ATOMIC_OPS
++#ifdef HAVE_NETBSD_ATOMIC_OPS
+#include <sys/atomic.h>
+#endif
#include <sys/types.h>
@@ -34,35 +34,42 @@ $NetBSD: patch-ab,v 1.11 2008/06/14 10:24:52 tnn Exp $
redo_lookup_with_port:
if ((res = getaddrinfo(host, port, &hints, &ai)) != 0 || !ai)
-@@ -1753,7 +1762,19 @@ _dbus_parse_uid (const DBusString *
+@@ -1753,7 +1762,26 @@ _dbus_parse_uid (const DBusString *
return TRUE;
}
-+#ifdef DBUS_USE_NETBSD_ATOMIC_OPS
++#ifdef HAVE_NETBSD_ATOMIC_OPS
+dbus_int32_t
+_dbus_atomic_inc (DBusAtomic *atomic)
+{
-+ return (atomic_inc_32_nv(DBusAtomic));
++ register dbus_int32_t old = atomic->value;
++
++ atomic_inc_uint((unsigned *)&atomic->value);
++ return old;
+}
+dbus_int32_t
+_dbus_atomic_dec (DBusAtomic *atomic)
+{
-+ return (atomic_dec_32_nv(DBusAtomic));
++ register dbus_int32_t old = atomic->value;
++
++ atomic_dec_uint((unsigned *)&atomic->value);
++ return old;
+}
++_DBUS_DEFINE_GLOBAL_LOCK (atomic);
+#else
_DBUS_DEFINE_GLOBAL_LOCK (atomic);
#if DBUS_USE_ATOMIC_INT_486_COND
-@@ -1818,6 +1839,7 @@ _dbus_atomic_dec (DBusAtomic *atomic)
+@@ -1818,6 +1846,7 @@ _dbus_atomic_dec (DBusAtomic *atomic)
return res;
#endif
}
-+#endif /* DBUS_USE_NETBSD_ATOMIC_OPS */
++#endif /* HAVE_NETBSD_ATOMIC_OPS */
#ifdef DBUS_BUILD_TESTS
/** Gets our GID
-@@ -2711,8 +2733,18 @@ int
+@@ -2711,8 +2740,18 @@ int
_dbus_printf_string_upper_bound (const char *format,
va_list args)
{