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-ab23
1 files changed, 23 insertions, 0 deletions
diff --git a/sysutils/dbus/patches/patch-ab b/sysutils/dbus/patches/patch-ab
new file mode 100644
index 00000000000..d344f0f0adb
--- /dev/null
+++ b/sysutils/dbus/patches/patch-ab
@@ -0,0 +1,23 @@
+$NetBSD: patch-ab,v 1.7 2008/02/05 22:03:02 tnn Exp $
+
+--- dbus/dbus-sysdeps-unix.c.orig 2006-12-11 14:21:09.000000000 -0500
++++ dbus/dbus-sysdeps-unix.c
+@@ -2311,8 +2311,18 @@ int
+ _dbus_printf_string_upper_bound (const char *format,
+ va_list args)
+ {
++#ifdef __hpux
++/* this code from libnbcompat's vsnprintf */
++ static FILE *devnull = 0;
++ if (!devnull) {
++ devnull = fopen("/dev/null", "w");
++ if (!devnull) return -1;
++ }
++ return vfprintf(devnull, format, args);
++#else
+ char c;
+ return vsnprintf (&c, 1, format, args);
++#endif
+ }
+
+ /**