summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am13
-rw-r--r--test/hciemu.c10
2 files changed, 8 insertions, 15 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 18989ba5..c2a456d5 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,12 +1,4 @@
-if GLIB
-glib_cflags = @GLIB_CFLAGS@
-glib_ldadd = @GLIB_LIBS@
-else
-glib_cflags =
-glib_ldadd =
-endif
-
if TEST
sbin_PROGRAMS = hciemu
@@ -14,7 +6,8 @@ bin_PROGRAMS = l2test rctest
noinst_PROGRAMS = sdptest scotest attest hstest bdaddr lmptest
-hciemu_LDADD = $(glib_ldadd) @BLUEZ_LIBS@ $(top_builddir)/common/libhelper.a
+hciemu_LDADD = $(top_builddir)/common/libhelper.a \
+ @GLIB_LIBS@ @BLUEZ_LIBS@
l2test_LDADD = @BLUEZ_LIBS@
@@ -36,7 +29,7 @@ lmptest_LDADD = @BLUEZ_LIBS@
noinst_MANS = bdaddr.8
-AM_CFLAGS = @BLUEZ_CFLAGS@ $(glib_cflags)
+AM_CFLAGS = @BLUEZ_CFLAGS@ @GLIB_CFLAGS@
endif
INCLUDES = -I$(top_srcdir)/common
diff --git a/test/hciemu.c b/test/hciemu.c
index a974a0c1..79f642a4 100644
--- a/test/hciemu.c
+++ b/test/hciemu.c
@@ -50,7 +50,7 @@
#include <netdb.h>
-#include "glib-ectomy.h"
+#include <glib.h>
#if __BYTE_ORDER == __LITTLE_ENDIAN
static inline uint64_t ntoh64(uint64_t n)
@@ -144,7 +144,7 @@ static inline void io_cancel(void)
static void sig_term(int sig)
{
io_cancel();
- g_main_quit(event_loop);
+ g_main_loop_quit(event_loop);
}
static gboolean io_acl_data(GIOChannel *chan, GIOCondition cond, gpointer data);
@@ -979,7 +979,7 @@ static gboolean io_hci_data(GIOChannel *chan, GIOCondition cond, gpointer data)
syslog(LOG_ERR, "Read failed: %s (%d)", strerror(errno), errno);
g_io_channel_unref(chan);
- g_main_quit(event_loop);
+ g_main_loop_quit(event_loop);
return FALSE;
}
@@ -1298,7 +1298,7 @@ int main(int argc, char *argv[])
dd = -1;
/* Create event loop */
- event_loop = g_main_new(FALSE);
+ event_loop = g_main_loop_new(NULL, FALSE);
if (dev >= 0)
return run_proxy(fd, dev, &bdaddr);
@@ -1333,7 +1333,7 @@ int main(int argc, char *argv[])
setpriority(PRIO_PROCESS, 0, -19);
/* Start event processor */
- g_main_run(event_loop);
+ g_main_loop_run(event_loop);
close(fd);