diff options
-rw-r--r-- | plugins/connman.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 <ofono/plugin.h> #include <ofono/private-network.h> +#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; |