diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-09-18 16:15:13 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-09-18 16:17:20 +0200 |
commit | 48fa75d6403b6a1aca9633a7359c1b4085bfb947 (patch) | |
tree | 4e22f050bdcfea10ba644fd7113b37185e712324 /main/dbus | |
parent | 160975aa3f0ac15740133ed527f85f13d536584e (diff) | |
download | aports-48fa75d6403b6a1aca9633a7359c1b4085bfb947.tar.bz2 aports-48fa75d6403b6a1aca9633a7359c1b4085bfb947.tar.xz |
main/dbus: fix printing int64 on 32bit systems
https://bugs.freedesktop.org/show_bug.cgi?id=92043
Diffstat (limited to 'main/dbus')
-rw-r--r-- | main/dbus/APKBUILD | 6 | ||||
-rw-r--r-- | main/dbus/fix-int64-print.patch | 56 |
2 files changed, 61 insertions, 1 deletions
diff --git a/main/dbus/APKBUILD b/main/dbus/APKBUILD index 764760e0be..c0c677038d 100644 --- a/main/dbus/APKBUILD +++ b/main/dbus/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=dbus pkgver=1.8.20 -pkgrel=0 +pkgrel=1 pkgdesc="Freedesktop.org message bus system" url="http://www.freedesktop.org/Software/dbus" pkggroups="messagebus" @@ -14,6 +14,7 @@ makedepends="expat-dev libx11-dev util-linux-dev" depends_dev="util-linux-dev" install="$pkgname.pre-install $pkgname.post-install" source="http://dbus.freedesktop.org/releases/dbus/dbus-$pkgver.tar.gz + fix-int64-print.patch $pkgname.initd " @@ -60,8 +61,11 @@ x11() { } md5sums="b49890bbabedab3a1c3f4f73c7ff8b2b dbus-1.8.20.tar.gz +2b6e9fa870408350ba0a35570540942b fix-int64-print.patch fc7a1faf3ce3cc311ddb4e6494a18cd1 dbus.initd" sha256sums="5c4fbf4c64621c96e871da91d2b729a5b00536e116d3c4612a469d924b1b703a dbus-1.8.20.tar.gz +b1ebb04883d37338d1d3aa5febdc1d05b41cbbbb013fead7ad8148c1beb1d263 fix-int64-print.patch 30084902702e1de4ba7447e63c6b392f56bfbb87f846e5e9659c4e80e93121fe dbus.initd" sha512sums="d63c29267e0445e329dc811e72d7858847fbae260920fd359b1fa889f08dead2a8b380e372718994daa92a262af970d1fcc58034fbcb8ffb3026ab5f30f63067 dbus-1.8.20.tar.gz +e3cde4e0dff0e808dc96720ad548616e2441c65bd07a90f730a333eaa4aa034b7dbb1bad1ee4fba33a85874a3679c44f8a29a04d1cb9921d2f8715bbdb7a37ad fix-int64-print.patch df74e7d6a4f76f777d356e94bd23422b17656aa51a5b2d3c655fcabb32c84f2f06b9f5cd8827920d51842f89e8c0d968a6e723315e4bf216e55711fcda9b0ee9 dbus.initd" diff --git a/main/dbus/fix-int64-print.patch b/main/dbus/fix-int64-print.patch new file mode 100644 index 0000000000..713739df99 --- /dev/null +++ b/main/dbus/fix-int64-print.patch @@ -0,0 +1,56 @@ +diff --git a/dbus/dbus-marshal-basic.c b/dbus/dbus-marshal-basic.c +index 74fe3f9..9315b6e 100644 +--- a/dbus/dbus-marshal-basic.c ++++ b/dbus/dbus-marshal-basic.c +@@ -29,6 +29,10 @@ + + #include <string.h> + ++#if !defined(PRIx64) && defined(DBUS_WIN) ++#define PRIx64 "%I64x" ++#endif ++ + #if defined(__GNUC__) && (__GNUC__ >= 4) + # define _DBUS_ASSERT_ALIGNMENT(type, op, val) \ + _DBUS_STATIC_ASSERT (__extension__ __alignof__ (type) op val) +@@ -1334,10 +1338,8 @@ _dbus_verbose_bytes (const unsigned char *data, + if (i > 7 && + _DBUS_ALIGN_ADDRESS (&data[i], 8) == &data[i]) + { +-#ifdef DBUS_INT64_PRINTF_MODIFIER +- _dbus_verbose (" u64: 0x%" DBUS_INT64_PRINTF_MODIFIER "x", ++ _dbus_verbose (" u64: 0x%" PRIx64, + *(dbus_uint64_t*)&data[i-8]); +-#endif + _dbus_verbose (" dbl: %g", + *(double*)&data[i-8]); + } +diff --git a/dbus/dbus-marshal-recursive-util.c b/dbus/dbus-marshal-recursive-util.c +index 3bc26a8..4d57f49 100644 +--- a/dbus/dbus-marshal-recursive-util.c ++++ b/dbus/dbus-marshal-recursive-util.c +@@ -31,6 +31,10 @@ + #include "dbus-internals.h" + #include <string.h> + ++#if !defined(PRIx64) && defined(DBUS_WIN) ++#define PRIx64 "%I64x" ++#endif ++ + static void + basic_value_zero (DBusBasicValue *value) + { +@@ -2644,12 +2648,10 @@ double_read_value (TestTypeNode *node, + + if (!_DBUS_DOUBLES_BITWISE_EQUAL (v, expected)) + { +-#ifdef DBUS_INT64_PRINTF_MODIFIER +- _dbus_warn ("Expected double %g got %g\n bits = 0x%" DBUS_INT64_PRINTF_MODIFIER "x vs.\n bits = 0x%" DBUS_INT64_PRINTF_MODIFIER "x)\n", ++ _dbus_warn ("Expected double %g got %g\n bits = 0x%" PRIx64 " vs.\n bits = 0x%" PRIx64 ")\n", + expected, v, + *(dbus_uint64_t*)(char*)&expected, + *(dbus_uint64_t*)(char*)&v); +-#endif + _dbus_assert_not_reached ("test failed"); + } + |