tethering: Fix handling of undefined DBUS_TYPE_UNIX_FD
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 2 Jun 2011 00:39:30 +0000 (02:39 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 2 Jun 2011 00:39:30 +0000 (02:39 +0200)
src/tethering.c

index c7f4f10..e9f4869 100644 (file)
 
 #include <gdbus.h>
 
+#ifndef DBUS_TYPE_UNIX_FD
+#define DBUS_TYPE_UNIX_FD -1
+#endif
+
 #define BRIDGE_PROC_DIR "/proc/sys/net/bridge"
 
 #define BRIDGE_NAME "tether"
@@ -513,6 +517,9 @@ int __connman_private_network_request(DBusMessage *msg, const char *owner)
        char *iface = NULL;
        int index, fd, err;
 
+       if (DBUS_TYPE_UNIX_FD < 0)
+               return -EINVAL;
+
        pn = g_hash_table_lookup(pn_hash, owner);
        if (pn != NULL)
                return -EEXIST;