From ce1c60d4e5f16dd654922db35b00bb3133819172 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 17 Jul 2011 19:35:29 +0200 Subject: [PATCH] connman: Handle D-Bus without fd passing support --- plugins/connman.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/connman.c b/plugins/connman.c index 40063851..3a3429fe 100644 --- a/plugins/connman.c +++ b/plugins/connman.c @@ -36,6 +36,10 @@ #include #include +#ifndef DBUS_TYPE_UNIX_FD +#define DBUS_TYPE_UNIX_FD -1 +#endif + #define CONNMAN_SERVICE "net.connman" #define CONNMAN_PATH "/net/connman" @@ -231,8 +235,10 @@ static int connman_request(ofono_private_network_cb_t cb, void *data) DBG(""); - req = g_try_new(struct connman_req, 1); + if (DBUS_TYPE_UNIX_FD < 0) + return -EBADF; + req = g_try_new(struct connman_req, 1); if (req == NULL) return -ENOMEM;