diff --git a/obexd/gwobex/gw-obex.c b/obexd/gwobex/gw-obex.c
index 6549b09..061e9e9 100644
--- a/obexd/gwobex/gw-obex.c
+++ b/obexd/gwobex/gw-obex.c
ctx->gio_source = NULL;
}
GW_OBEX_UNLOCK(ctx);
-#ifdef G_THREADS_ENABLED
+#ifdef GW_OBEX_THREADS_ENABLED
g_mutex_free(ctx->mutex);
ctx->mutex = NULL;
#endif
ctx = make_context(handle);
-#ifdef G_THREADS_ENABLED
+#ifdef GW_OBEX_THREADS_ENABLED
if (!g_thread_supported())
g_thread_init(NULL);
ctx->mutex = g_mutex_new();
debug("Connecting to OBEX service\n");
if (!gw_obex_connect(ctx, uuid, uuid_len)) {
debug("Unable to connect to OBEX service\n");
-#ifdef G_THREADS_ENABLED
+#ifdef GW_OBEX_THREADS_ENABLED
g_mutex_free(ctx->mutex);
ctx->mutex = NULL;
#endif
diff --git a/obexd/gwobex/obex-priv.h b/obexd/gwobex/obex-priv.h
index 051c67a..b6cbbf6 100644
--- a/obexd/gwobex/obex-priv.h
+++ b/obexd/gwobex/obex-priv.h
#define OBP_TYPE "x-obex/object-profile"
#define LST_TYPE "x-obex/folder-listing"
-#ifdef G_THREADS_ENABLED
+#ifdef GW_OBEX_THREADS_ENABLED
# ifdef DEBUG
# define GW_OBEX_LOCK(ctx) do { \
debug("Attempting GW_OBEX_LOCK at %s:%d (%s)...", __FILE__, __LINE__, __PRETTY_FUNCTION__); \
} __attribute__ ((packed)) obex_connect_hdr_t;
struct gw_obex {
-#ifdef G_THREADS_ENABLED
+#ifdef GW_OBEX_THREADS_ENABLED
/* To get rid of race conditions in multithreaded apps */
GMutex *mutex;
#endif