diff options
author | Denis Kenzior <denkenz@gmail.com> | 2011-02-23 17:33:46 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-02-23 17:33:46 -0600 |
commit | f214e80f2eb38728797c42344387efa8de9d0a4e (patch) | |
tree | 97a600137c7beec30cb43f2d4103a345ed534d9b /tools/get-location.c | |
parent | 8a909a6ef9482341eb8d8928453bb5a73ac3541e (diff) | |
download | ofono-f214e80f2eb38728797c42344387efa8de9d0a4e.tar.bz2 |
get-location: fix compilation error
If fd-passing is not enabled, we get a compiler error.
Diffstat (limited to 'tools/get-location.c')
-rw-r--r-- | tools/get-location.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/get-location.c b/tools/get-location.c index dafb3c4a..ae156b99 100644 --- a/tools/get-location.c +++ b/tools/get-location.c @@ -37,6 +37,10 @@ #include <dbus/dbus.h> #include <glib.h> +#ifndef DBUS_TYPE_UNIX_FD +#define DBUS_TYPE_UNIX_FD -1 +#endif + static GMainLoop *event_loop; static char *get_first_modem_path(DBusConnection *conn) @@ -213,6 +217,11 @@ int main(int argc, char *argv[]) int data_source; int ret; + if (DBUS_TYPE_UNIX_FD < 0) { + fprintf(stderr, "File-descriptor passing not supported\n"); + exit(1); + } + conn = dbus_bus_get(DBUS_BUS_SYSTEM, NULL); if (!conn) { fprintf(stderr, "Can't get on system bus\n"); |