aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim 'max_posedon' Melnikau <maxposedon@gmail.com>2010-02-04 00:00:28 +0000
committerMaksim 'max_posedon' Melnikau <maxposedon@gmail.com>2010-02-04 00:00:28 +0000
commit61a8033b3033754476465aecaad3e9b46e96ab1d (patch)
tree7973eb1c4df15d6859c6499611a3ea54bb3c2be3 /sys-apps
parentbump vala-terminal-1.2 (diff)
downloadembedded-cross-61a8033b3033754476465aecaad3e9b46e96ab1d.tar.gz
embedded-cross-61a8033b3033754476465aecaad3e9b46e96ab1d.tar.bz2
embedded-cross-61a8033b3033754476465aecaad3e9b46e96ab1d.zip
dbus-1.3.0-r1 add Make-the-default-DBus-reply-timeout-configurable.patch
and set default timeout to 3mins, its required for correct fso working
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/dbus/Manifest5
-rw-r--r--sys-apps/dbus/dbus-1.3.0-r1.ebuild177
-rw-r--r--sys-apps/dbus/files/0001-Make-the-default-DBus-reply-timeout-configurable.patch78
-rw-r--r--sys-apps/dbus/files/dbus-1.3.0-asneeded.patch84
-rw-r--r--sys-apps/dbus/files/dbus-1.3.0-no-cloexec.patch21
5 files changed, 365 insertions, 0 deletions
diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest
index 84c6ab3..063396a 100644
--- a/sys-apps/dbus/Manifest
+++ b/sys-apps/dbus/Manifest
@@ -1,8 +1,13 @@
+AUX 0001-Make-the-default-DBus-reply-timeout-configurable.patch 3449 RMD160 b69a6cde260597e484abf62ae36bf5b7d86de128 SHA1 09e5724b7bdb6bc1f0fc627bc640f314fafeeb50 SHA256 811ca42e5abe93278c1fd3d4abd5bb5909229a680ed131e4891b4322f7484b8c
AUX 30-dbus 243 RMD160 b5e7a813cd5d91f2ea60bb22260e432cbfb72fd9 SHA1 35ee3a5d3db9c7e372603ce916e17a41edd01d36 SHA256 a8e8fec9769cc5d46df8216f7d1e1f9df422c4e46f293fd70d4b017fb01d959d
AUX dbus-1.2.3-bsd.patch 1638 RMD160 9a134c5e1ccc1215d0579a02568a5707ad39e484 SHA1 061787f8131f33ccf07f11e04e6a327372de1c69 SHA256 0428d70451344153c6bf44f12d04fb7732070abf44d0d162ad995de5a9a24f1e
AUX dbus-1.2.3-panic-from-dbus_signature_validate.patch 1064 RMD160 a7a587fb604f94f8d064c21d0adfae080edc1a80 SHA1 309faf628e3a207985c79afd2789b8cce696eed6 SHA256 455e2834b71878b3ea1ff9f0b678c8890b2c25f0c309c96c4a8e5551e23bca68
+AUX dbus-1.3.0-asneeded.patch 3655 RMD160 31d3eef602d1d95adfe548285e00c25699f5d027 SHA1 52a3b43fbc2596b2b05fabdd146e5afea9318c24 SHA256 02731d3576eea22a8596267dd7b96bc59980e5f74fdd87c96317843b5936b2af
+AUX dbus-1.3.0-no-cloexec.patch 578 RMD160 74403299da1ab2224738cd9770462cf5e1d037ee SHA1 5ff5856e4fc1a10bcdd841e2c0650e417badade6 SHA256 aba67f8431dd66619c0f6105b99fc887d0b0da90f86765ef56eb1919d822249e
AUX dbus.init-1.0 1152 RMD160 f0f409b59167beef2e2b8c14f701fbeaa54c3bc9 SHA1 b00e23868046c67eaec87220e92ffcea5d9dd911 SHA256 a2e13a025faa488ff35521188c0d44909bc82c55e8676a24a5a5179545303d98
DIST dbus-1.2.12.tar.gz 1574756 RMD160 779d76320f1343dae7447c82a683e372e6c11729 SHA1 13de8dc28c9edae7b9d2928ff691549bb2bef21a SHA256 b2ec81e7d9fa5e24f67baccfd9af2755a7797a65cb4c3cad10d023867f2bd220
DIST dbus-1.2.3.tar.gz 1564475 RMD160 d1a207b2a4c744f27c9c01388e80cebdb61f43f0 SHA1 ceb8d496bc1a9c2dcdbe559515c01ec9c0cdcf81 SHA256 16ffaa4a8758f115cf02c78962b0849ed4d802872420fd460c433a9cd580ed1a
+DIST dbus-1.3.0.tar.gz 1517408 RMD160 ed823727c11a437e9a0d548b9c3d92a8fd4d386b SHA1 ebd23c65ebf5448efc6367da1414de212db38055 SHA256 fe32b49667894cf91b0a97503163be5c4814ecf67259e8feb26d1ba57cb03dae
EBUILD dbus-1.2.12.ebuild 4040 RMD160 f33351b5c8725760cfcf50ded1f4ed2a8a802df2 SHA1 c99b12b72c9deb44d91c3cab8b06fff4396fd2b1 SHA256 9b0c7864ab3f8b184aef523e078556a3d911ad5eb9e77d273e4ab9e2fb471675
EBUILD dbus-1.2.3-r1.ebuild 3913 RMD160 037c5b6fa0382a69c6f08d17637c48eefbb1fc8d SHA1 9e86c1e8bc4383cdb8b0b5b39e10144575397c2a SHA256 138725b1db699679c06eae0c5fcb1e11e7fdb476f537260dc74a3aae2a052558
+EBUILD dbus-1.3.0-r1.ebuild 4955 RMD160 0606b6fdfedb070a04b8a175b55b205d4381d1cb SHA1 8b2d6ff7dc5240c3d9334656a3b022b0e5767451 SHA256 635cb936b98789d9258fa3448fae43be9e42faa297b9b2fdb4e428156dd23167
diff --git a/sys-apps/dbus/dbus-1.3.0-r1.ebuild b/sys-apps/dbus/dbus-1.3.0-r1.ebuild
new file mode 100644
index 0000000..a9caa87
--- /dev/null
+++ b/sys-apps/dbus/dbus-1.3.0-r1.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-1.3.0-r1.ebuild,v 1.3 2009/11/23 21:27:56 eva Exp $
+
+EAPI="2"
+
+inherit autotools eutils multilib flag-o-matic
+
+DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
+HOMEPAGE="http://dbus.freedesktop.org/"
+SRC_URI="http://dbus.freedesktop.org/releases/dbus/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 AFL-2.1 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="debug doc selinux test X"
+
+RDEPEND="X? ( x11-libs/libXt x11-libs/libX11 )
+ selinux? ( sys-libs/libselinux
+ sec-policy/selinux-dbus )
+ >=dev-libs/expat-1.95.8
+ !<sys-apps/dbus-0.91"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ doc? (
+ app-doc/doxygen
+ app-text/xmlto
+ app-text/docbook-xml-dtd:4.1.2 )"
+
+# out of sources build directory
+BD=${WORKDIR}/${P}-build
+# out of sources build dir for make check
+TBD=${WORKDIR}/${P}-tests-build
+
+src_prepare() {
+ # Remove CFLAGS that is not supported by all gcc, bug #274456
+ sed 's/-Wno-pointer-sign//g' -i configure.in configure || die "sed failed"
+
+ # Tests were restricted because of this
+ sed -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
+ -e '/"dispatch"/d' -i "${S}/bus/test-main.c"
+ epatch "${FILESDIR}"/${P}-asneeded.patch
+ epatch "${FILESDIR}"/${P}-no-cloexec.patch
+ epatch "${FILESDIR}"/0001-Make-the-default-DBus-reply-timeout-configurable.patch
+
+ # required for asneeded patch but also for bug 263909, cross-compile so
+ # don't remove eautoreconf
+ eautoreconf
+}
+
+src_configure() {
+ local my_conf
+
+ # libaudit is *only* used in DBus wrt SELinux support, so disable it, if
+ # not on an SELinux profile.
+ my_conf="$(use_with X x)
+ $(use_enable debug verbose-mode)
+ $(use_enable debug asserts)
+ $(use_enable kernel_linux inotify)
+ $(use_enable kernel_FreeBSD kqueue)
+ $(use_enable selinux)
+ $(use_enable selinux libaudit)
+ --with-xml=expat
+ --with-system-pid-file=/var/run/dbus.pid
+ --with-system-socket=/var/run/dbus/system_bus_socket
+ --with-session-socket-dir=/tmp
+ --with-dbus-user=messagebus
+ --with-dbus-default-reply-timeout=180000
+ --localstatedir=/var"
+
+ mkdir "${BD}"
+ cd "${BD}"
+ einfo "Running configure in ${BD}"
+ ECONF_SOURCE="${S}" econf ${my_conf} \
+ $(use_enable doc doxygen-docs) \
+ $(use_enable doc xml-docs)
+
+ if use test; then
+ mkdir "${TBD}"
+ cd "${TBD}"
+ einfo "Running configure in ${TBD}"
+ ECONF_SOURCE="${S}" econf \
+ ${my_conf} \
+ $(use_enable test checks) \
+ $(use_enable test tests) \
+ $(use_enable test asserts)
+ fi
+}
+
+src_compile() {
+ # after the compile, it uses a selinuxfs interface to
+ # check if the SELinux policy has the right support
+ use selinux && addwrite /selinux/access
+
+ cd "${BD}"
+ einfo "Running make in ${BD}"
+ emake || die "make failed"
+
+ if use doc; then
+ einfo "Building API documentation..."
+ doxygen || die "doxygen failed"
+ fi
+
+ if use test; then
+ cd "${TBD}"
+ einfo "Running make in ${TBD}"
+ emake || die "make failed"
+ fi
+}
+
+src_test() {
+ cd "${TBD}"
+ DBUS_VERBOSE=1 make check || die "make check failed"
+}
+
+src_install() {
+ # initscript
+ newinitd "${FILESDIR}"/dbus.init-1.0 dbus
+
+ if use X ; then
+ # dbus X session script (#77504)
+ # turns out to only work for GDM. has been merged into other desktop
+ # (kdm and such scripts)
+ exeinto /etc/X11/xinit/xinitrc.d/
+ doexe "${FILESDIR}"/30-dbus || die "doexe failed"
+ fi
+
+ # needs to exist for the system socket
+ keepdir /var/run/dbus
+ # needs to exist for machine id
+ keepdir /var/lib/dbus
+ # needs to exist for dbus sessions to launch
+
+ keepdir /usr/lib/dbus-1.0/services
+ keepdir /usr/share/dbus-1/services
+ keepdir /etc/dbus-1/system.d/
+ keepdir /etc/dbus-1/session.d/
+
+ dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO || die "dodoc failed"
+
+ cd "${BD}"
+ # FIXME: split dtd's in dbus-dtd ebuild
+ emake DESTDIR="${D}" install || die "make install failed"
+ if use doc; then
+ dohtml doc/*.html doc/api/html/* || die "dohtml failed"
+ fi
+}
+
+pkg_preinst() {
+ enewgroup messagebus
+ enewuser messagebus -1 "-1" -1 messagebus
+}
+
+pkg_postinst() {
+ elog "To start the D-Bus system-wide messagebus by default"
+ elog "you should add it to the default runlevel :"
+ elog "\`rc-update add dbus default\`"
+ elog
+ elog "Some applications require a session bus in addition to the system"
+ elog "bus. Please see \`man dbus-launch\` for more information."
+ elog
+ elog
+ ewarn "You MUST run 'revdep-rebuild' after emerging this package"
+ elog
+ ewarn "You must restart D-Bus \`/etc/init.d/dbus restart\` to run"
+ ewarn "the new version of the daemon."
+
+ if has_version "x11-base/xorg-server[hal]"; then
+ elog
+ ewarn "You are currently running X with the hal useflag enabled"
+ ewarn "restarting the dbus service WILL restart X as well"
+ ebeep 5
+ fi
+
+ # Ensure unique id is generated
+ dbus-uuidgen --ensure="${ROOT}"/var/lib/dbus/machine-id
+}
diff --git a/sys-apps/dbus/files/0001-Make-the-default-DBus-reply-timeout-configurable.patch b/sys-apps/dbus/files/0001-Make-the-default-DBus-reply-timeout-configurable.patch
new file mode 100644
index 0000000..a38e3db
--- /dev/null
+++ b/sys-apps/dbus/files/0001-Make-the-default-DBus-reply-timeout-configurable.patch
@@ -0,0 +1,78 @@
+From fb546488e93a1638d377b228bbb0d2ab58462168 Mon Sep 17 00:00:00 2001
+From: Daniel Willmann <daniel@totalueberwachung.de>
+Date: Thu, 2 Oct 2008 15:50:17 +0800
+Subject: [PATCH] Make the default DBus reply timeout configurable
+
+This patch adds an option --with-dbus-default-reply-timeout to configure
+that will set the default reply timeout used by libdbus in milliseconds.
+autoconf and autoheader need to be rerun in order to regenerate the
+correct configure and config.h.in files.
+---
+ configure.in | 9 +++++++++
+ dbus/dbus-connection-internal.h | 3 ---
+ dbus/dbus-pending-call.c | 1 +
+ 3 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 62ac387..5c912d7 100644
+--- a/configure.in
++++ b/configure.in
+@@ -88,6 +88,7 @@ AC_ARG_WITH(console-auth-dir, AS_HELP_STRING([--with-console-auth-dir=[dirname]]
+ AC_ARG_WITH(console-owner-file, AS_HELP_STRING([--with-console-owner-file=[filename]],[file whose owner determines current console owner]))
+ AC_ARG_WITH(dbus_user, AS_HELP_STRING([--with-dbus-user=<user>],[User for running the DBUS daemon (messagebus)]))
+ AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Directory for installing the DBUS daemon]))
++AC_ARG_WITH(dbus_default_reply_timeout, AS_HELP_STRING([--with-dbus-default-reply-timeout=[milliseconds]],[Default reply timeout for DBus method calls]))
+
+ AC_DEFINE(DBUS_UNIX,1,[dbus on unix])
+
+@@ -986,6 +987,13 @@ if test x$have_libaudit = xyes ; then
+ AC_DEFINE(HAVE_LIBAUDIT,1,[audit daemon SELinux support])
+ fi
+
++if test -z "$with_dbus_default_reply_timeout" ; then
++ DBUS_DEFAULT_REPLY_TIMEOUT=25000
++else
++ DBUS_DEFAULT_REPLY_TIMEOUT=$with_dbus_default_reply_timeout
++fi
++AC_DEFINE_UNQUOTED(_DBUS_DEFAULT_TIMEOUT_VALUE,$DBUS_DEFAULT_REPLY_TIMEOUT,[default timeout value for dbus calls])
++
+ #### Set up final flags
+ DBUS_CLIENT_CFLAGS=
+ DBUS_CLIENT_LIBS="$THREAD_LIBS"
+@@ -1348,6 +1356,7 @@ echo "
+ Gettext libs (empty OK): ${INTLLIBS}
+ Using XML parser: ${with_xml}
+ Init scripts style: ${with_init_scripts}
++ Default reply timeout: ${DBUS_DEFAULT_REPLY_TIMEOUT}
+ Abstract socket names: ${ac_cv_have_abstract_sockets}
+ System bus socket: ${DBUS_SYSTEM_SOCKET}
+ System bus address: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
+diff --git a/dbus/dbus-connection-internal.h b/dbus/dbus-connection-internal.h
+index df54412..5fe536b 100644
+--- a/dbus/dbus-connection-internal.h
++++ b/dbus/dbus-connection-internal.h
+@@ -41,9 +41,6 @@ typedef enum
+ DBUS_ITERATION_BLOCK = 1 << 2 /**< Block if nothing to do. */
+ } DBusIterationFlags;
+
+-/** default timeout value when waiting for a message reply, 25 seconds */
+-#define _DBUS_DEFAULT_TIMEOUT_VALUE (25 * 1000)
+-
+ void _dbus_connection_lock (DBusConnection *connection);
+ void _dbus_connection_unlock (DBusConnection *connection);
+ DBusConnection * _dbus_connection_ref_unlocked (DBusConnection *connection);
+diff --git a/dbus/dbus-pending-call.c b/dbus/dbus-pending-call.c
+index 51b9378..5a7a5f4 100644
+--- a/dbus/dbus-pending-call.c
++++ b/dbus/dbus-pending-call.c
+@@ -21,6 +21,7 @@
+ *
+ */
+
++#include <config.h>
+ #include "dbus-internals.h"
+ #include "dbus-connection-internal.h"
+ #include "dbus-pending-call-internal.h"
+--
+1.5.6.4
+
diff --git a/sys-apps/dbus/files/dbus-1.3.0-asneeded.patch b/sys-apps/dbus/files/dbus-1.3.0-asneeded.patch
new file mode 100644
index 0000000..0f099cd
--- /dev/null
+++ b/sys-apps/dbus/files/dbus-1.3.0-asneeded.patch
@@ -0,0 +1,84 @@
+diff -ur dbus-1.3.0.orig/dbus/Makefile.am dbus-1.3.0/dbus/Makefile.am
+--- dbus-1.3.0.orig/dbus/Makefile.am 2008-04-04 19:32:04.000000000 +0300
++++ dbus-1.3.0/dbus/Makefile.am 2009-08-05 20:15:21.000000000 +0300
+@@ -176,6 +176,7 @@
+ libdbus_1_la_LDFLAGS= -export-symbols-regex "^[^_].*" -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -no-undefined @R_DYNAMIC_LDFLAG@ @PIC_LDFLAGS@
+
+ libdbus_convenience_la_LDFLAGS=@R_DYNAMIC_LDFLAG@
++libdbus_convenience_la_LIBADD=$(DBUS_TEST_LIBS)
+
+ ## note that TESTS has special meaning (stuff to use in make check)
+ ## so if adding tests not to be run in make check, don't add them to
+@@ -194,7 +195,7 @@
+ dbus_test_SOURCES= \
+ dbus-test-main.c
+
+-dbus_test_LDADD=libdbus-convenience.la $(DBUS_TEST_LIBS)
++dbus_test_LDADD=$(DBUS_TEST_LIBS) libdbus-convenience.la
+ dbus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ ## mop up the gcov files
+diff -ur dbus-1.3.0.orig/test/name-test/Makefile.am dbus-1.3.0/test/name-test/Makefile.am
+--- dbus-1.3.0.orig/test/name-test/Makefile.am 2009-07-16 17:01:01.000000000 +0300
++++ dbus-1.3.0/test/name-test/Makefile.am 2009-08-05 20:12:15.000000000 +0300
+@@ -21,52 +21,52 @@
+ test_names_SOURCES= \
+ test-names.c
+
+-test_names_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS)
++test_names_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la
+ test_names_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ test_pending_call_dispatch_SOURCES = \
+ test-pending-call-dispatch.c
+
+-test_pending_call_dispatch_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS)
++test_pending_call_dispatch_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la
+ test_pending_call_dispatch_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ test_pending_call_timeout_SOURCES = \
+ test-pending-call-timeout.c
+
+-test_pending_call_timeout_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS)
++test_pending_call_timeout_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la
+ test_pending_call_timeout_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ test_threads_init_SOURCES = \
+ test-threads-init.c
+
+-test_threads_init_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS)
++test_threads_init_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la
+ test_threads_init_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ test_ids_SOURCES = \
+ test-ids.c
+
+-test_ids_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS)
++test_ids_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la
+ test_ids_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ test_shutdown_SOURCES = \
+ test-shutdown.c
+
+ test_shutdown_CFLAGS=
+-test_shutdown_LDADD=$(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la $(DBUS_TEST_LIBS)
++test_shutdown_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la
+ test_shutdown_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ test_privserver_SOURCES = \
+ test-privserver.c
+
+ test_privserver_CFLAGS=
+-test_privserver_LDADD=$(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la $(DBUS_TEST_LIBS)
++test_privserver_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la
+ test_privserver_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ test_privserver_client_SOURCES = \
+ test-privserver-client.c
+
+ test_privserver_client_CFLAGS=
+-test_privserver_client_LDADD=$(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la $(DBUS_TEST_LIBS)
++test_privserver_client_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la
+ test_privserver_client_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ endif
diff --git a/sys-apps/dbus/files/dbus-1.3.0-no-cloexec.patch b/sys-apps/dbus/files/dbus-1.3.0-no-cloexec.patch
new file mode 100644
index 0000000..ba76eec
--- /dev/null
+++ b/sys-apps/dbus/files/dbus-1.3.0-no-cloexec.patch
@@ -0,0 +1,21 @@
+commit a8cf509a06cdc42568e446dea8a54a398e1c003b
+Author: Benjamin Reed <rangerrick@befunk.com>
+Date: Wed Jul 22 08:47:51 2009 -0400
+
+ Fix compilation on non-Linux: the F_DUPFD_CLOEXEC check was reversed
+
+ Signed-off-by: Thiago Macieira <thiago@kde.org>
+
+diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
+index f0f1e70..e60e614 100644
+--- a/dbus/dbus-sysdeps-unix.c
++++ b/dbus/dbus-sysdeps-unix.c
+@@ -3043,7 +3043,7 @@ _dbus_dup(int fd,
+ return -1;
+ }
+
+-#ifndef F_DUPFD_CLOEXEC
++#ifdef F_DUPFD_CLOEXEC
+ if (!cloexec_done)
+ #endif
+ {