summaryrefslogtreecommitdiff
path: root/sysutils/dbus/patches/patch-ab
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2008-02-05 22:03:02 +0000
committertnn <tnn@pkgsrc.org>2008-02-05 22:03:02 +0000
commite7990daf1258ef001843468cbbee425a47fff97d (patch)
treea0174dd3a5641b6188c5e8ea710f12a28de5bcd2 /sysutils/dbus/patches/patch-ab
parent943c20192b0c3c4bfb522e75c852b3dcda5b21d9 (diff)
downloadpkgsrc-e7990daf1258ef001843468cbbee425a47fff97d.tar.gz
Kludge around the fact that the return value from vsnprintf is broken on hp-ux.
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
+ }
+
+ /**