diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-01-12 00:37:42 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-01-12 00:37:42 +0000 |
commit | c97480f11bdfdc3cbb867b8127074bcb6b047024 (patch) | |
tree | 885dff3c4d9f46567af438af0e266acdc932f281 /hcid | |
parent | b6f6c5cf2f85f27b277b891acf0a22c4a068bbbe (diff) |
Allow compilation against GLib
Diffstat (limited to 'hcid')
-rw-r--r-- | hcid/Makefile.am | 12 | ||||
-rw-r--r-- | hcid/dbus-adapter.c | 1 | ||||
-rw-r--r-- | hcid/dbus-hci.c | 1 | ||||
-rw-r--r-- | hcid/dbus-rfcomm.c | 1 | ||||
-rw-r--r-- | hcid/dbus-sdp.c | 1 | ||||
-rw-r--r-- | hcid/dbus-security.c | 1 | ||||
-rw-r--r-- | hcid/dbus-test.c | 1 | ||||
-rw-r--r-- | hcid/main.c | 6 | ||||
-rw-r--r-- | hcid/sdp.c | 1 |
9 files changed, 20 insertions, 5 deletions
diff --git a/hcid/Makefile.am b/hcid/Makefile.am index afab067f..167c9bdf 100644 --- a/hcid/Makefile.am +++ b/hcid/Makefile.am @@ -13,6 +13,14 @@ dbusdir = $(sysconfdir)/dbus-1/system.d dbus_DATA = bluetooth.conf endif +if GLIB +glib_cflags = @GLIB_CFLAGS@ +glib_ldadd = @GLIB_LIBS@ +else +glib_cflags = +glib_ldadd = +endif + noinst_LIBRARIES = libhciserver.a libhciserver_a_SOURCES = hcid.h security.c device.c storage.c \ @@ -30,7 +38,7 @@ noinst_PROGRAMS = passkey-agent service-agent auth-agent hcid_SOURCES = main.c -hcid_LDADD = @DBUS_LIBS@ @BLUEZ_LIBS@ \ +hcid_LDADD = $(glib_ldadd) @DBUS_LIBS@ @BLUEZ_LIBS@ \ libhciserver.a $(top_builddir)/common/libhelper.a if EXPAT @@ -49,7 +57,7 @@ auth_agent_SOURCES = auth-agent.c auth_agent_LDADD = @DBUS_LIBS@ -AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ +AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ $(glib_cflags) INCLUDES = -I$(top_srcdir)/common diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c index a4ca8712..f27e2ccf 100644 --- a/hcid/dbus-adapter.c +++ b/hcid/dbus-adapter.c @@ -30,6 +30,7 @@ #include <errno.h> #include <fcntl.h> #include <unistd.h> +#include <stdlib.h> #include <time.h> #include <sys/param.h> #include <sys/ioctl.h> diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c index 8fd443b6..fc316620 100644 --- a/hcid/dbus-hci.c +++ b/hcid/dbus-hci.c @@ -29,6 +29,7 @@ #include <stdio.h> #include <errno.h> #include <unistd.h> +#include <stdlib.h> #include <string.h> #include <sys/param.h> #include <sys/ioctl.h> diff --git a/hcid/dbus-rfcomm.c b/hcid/dbus-rfcomm.c index 479763fa..d238669c 100644 --- a/hcid/dbus-rfcomm.c +++ b/hcid/dbus-rfcomm.c @@ -29,6 +29,7 @@ #include <errno.h> #include <fcntl.h> #include <unistd.h> +#include <stdlib.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <sys/socket.h> diff --git a/hcid/dbus-sdp.c b/hcid/dbus-sdp.c index 028a0670..2e3d563a 100644 --- a/hcid/dbus-sdp.c +++ b/hcid/dbus-sdp.c @@ -29,6 +29,7 @@ #include <errno.h> #include <fcntl.h> #include <unistd.h> +#include <stdlib.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/param.h> diff --git a/hcid/dbus-security.c b/hcid/dbus-security.c index 1b5f0067..012114aa 100644 --- a/hcid/dbus-security.c +++ b/hcid/dbus-security.c @@ -28,6 +28,7 @@ #include <stdio.h> #include <errno.h> +#include <stdlib.h> #include <sys/socket.h> #include <bluetooth/bluetooth.h> diff --git a/hcid/dbus-test.c b/hcid/dbus-test.c index 4dea5780..988fd5f0 100644 --- a/hcid/dbus-test.c +++ b/hcid/dbus-test.c @@ -27,6 +27,7 @@ #include <stdio.h> #include <errno.h> +#include <stdlib.h> #include <dbus/dbus.h> diff --git a/hcid/main.c b/hcid/main.c index 722a3b15..d0490cfe 100644 --- a/hcid/main.c +++ b/hcid/main.c @@ -524,7 +524,7 @@ static void init_defaults(void) static void sig_term(int sig) { - g_main_quit(event_loop); + g_main_loop_quit(event_loop); } static void sig_hup(int sig) @@ -728,7 +728,7 @@ int main(int argc, char *argv[]) init_security_data(); /* Create event loop */ - event_loop = g_main_new(FALSE); + event_loop = g_main_loop_new(NULL, FALSE); ctl_io = g_io_channel_unix_new(hcid.sock); g_io_channel_set_close_on_unref(ctl_io, TRUE); @@ -753,7 +753,7 @@ int main(int argc, char *argv[]) cleanup_sdp_session(); - g_main_unref(event_loop); + g_main_loop_unref(event_loop); g_io_channel_unref(ctl_io); @@ -28,6 +28,7 @@ #include <stdio.h> #include <errno.h> #include <unistd.h> +#include <stdlib.h> #include <sys/socket.h> #include <bluetooth/bluetooth.h> |