dbus-native: fix build on few systems (error: storage size of 'cr' isn't known)

Bug was reported in OE bugtracker: http://bugs.openembedded.net/show_bug.cgi?id=4334

| dbus-sysdeps-unix.c: In function '_dbus_read_credentials_unix_socket':
| dbus-sysdeps-unix.c:1002: error: storage size of 'cr' isn't known
| dbus-sysdeps-unix.c:1005: warning: pointer targets in passing argument 5 of 'getsockopt' differ in signedness
| dbus-sysdeps-unix.c:1002: warning: unused variable 'cr'
This commit is contained in:
Marcin Juszkiewicz 2009-02-20 17:27:40 +01:00
parent bb3786088c
commit 4d4c63f2db
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,24 @@
Dbus-native fails to build on few systems:
- Debian 'sid' post-Lenny release
- Fedora 9
Bug was reported in OE bugtracker: http://bugs.openembedded.net/show_bug.cgi?id=4334
| dbus-sysdeps-unix.c: In function '_dbus_read_credentials_unix_socket':
| dbus-sysdeps-unix.c:1002: error: storage size of 'cr' isn't known
| dbus-sysdeps-unix.c:1005: warning: pointer targets in passing argument 5 of 'getsockopt' differ in signedness
| dbus-sysdeps-unix.c:1002: warning: unused variable 'cr'
diff -urN dbus-1.0.1.orig/dbus/dbus-sysdeps-unix.c dbus-1.0.1/dbus/dbus-sysdeps-unix.c
--- dbus-1.0.1.orig/dbus/dbus-sysdeps-unix.c 2009-01-01 03:50:33.000000000 +0200
+++ dbus-1.0.1/dbus/dbus-sysdeps-unix.c 2009-01-01 04:09:24.000000000 +0200
@@ -992,7 +992,7 @@
_dbus_verbose ("read credentials byte\n");
{
-#ifdef SO_PEERCRED
+#if defined(SO_PEERCRED) && defined(HAVE_GETPEERUCRED)
struct ucred cr;
int cr_len = sizeof (cr);

View File

@ -3,7 +3,7 @@ HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
LICENSE = "GPL"
SECTION = "base"
PR = "r0"
PR = "r1"
DEPENDS = "glib-2.0-native libxml2-native expat-native"
@ -12,6 +12,7 @@ DEFAULT_PREFERENCE = "-1"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/dbus-${PV}"
SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
file://cross.patch;patch=1 \
file://fix-cr-size.patch;patch=1 \
"
inherit autotools pkgconfig gettext native