From dcb85727c3649c254c985d840aa2efb36f727872 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sat, 3 Sep 2011 02:10:48 +0200 Subject: Completely remove glib dependency. --- dev/Makefile.am | 14 +++++++++----- dev/ideviceclient.c | 9 +++++---- 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'dev') diff --git a/dev/Makefile.am b/dev/Makefile.am index 72c00a3..c1d2b45 100644 --- a/dev/Makefile.am +++ b/dev/Makefile.am @@ -1,10 +1,14 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -AM_CFLAGS = $(GLOBAL_CFLAGS) $(libglib2_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(libgthread2_CFLAGS) $(LFS_CFLAGS) -AM_LDFLAGS = $(libglib2_LIBS) $(libgnutls_LIBS) $(libtasn1_LIBS) $(libgthread2_LIBS) +AM_CFLAGS = $(GLOBAL_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(LFS_CFLAGS) +AM_LDFLAGS = $(libgnutls_LIBS) $(libtasn1_LIBS) $(libpthread_LIBS) if ENABLE_DEVTOOLS -noinst_PROGRAMS = ideviceclient lckd-client afccheck filerelaytest housearresttest +noinst_PROGRAMS = ideviceclient afccheck filerelaytest housearresttest + +if HAVE_GLIB2 +noinst_PROGRAMS += lckd-client +endif ideviceclient_SOURCES = ideviceclient.c ideviceclient_CFLAGS = $(AM_CFLAGS) @@ -12,8 +16,8 @@ ideviceclient_LDFLAGS = $(AM_LDFLAGS) ideviceclient_LDADD = ../src/libimobiledevice.la lckd_client_SOURCES = lckdclient.c -lckd_client_CFLAGS = $(AM_CFLAGS) -lckd_client_LDFLAGS = -lreadline $(AM_LDFLAGS) +lckd_client_CFLAGS = $(AM_CFLAGS) $(libglib2_CFLAGS) +lckd_client_LDFLAGS = -lreadline $(AM_LDFLAGS) $(libglib2_LIBS) lckd_client_LDADD = ../src/libimobiledevice.la afccheck_SOURCES = afccheck.c diff --git a/dev/ideviceclient.c b/dev/ideviceclient.c index d952594..0400fed 100644 --- a/dev/ideviceclient.c +++ b/dev/ideviceclient.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -138,18 +137,20 @@ int main(int argc, char *argv[]) printf("Directory time.\n"); for (i = 0; dirs[i]; i++) { printf("/%s\n", dirs[i]); + free(dirs[i]); } - - g_strfreev(dirs); + if (dirs) + free(dirs); dirs = NULL; afc_get_device_info(afc, &dirs); if (dirs) { for (i = 0; dirs[i]; i += 2) { printf("%s: %s\n", dirs[i], dirs[i + 1]); + free(dirs[i]); } + free(dirs); } - g_strfreev(dirs); uint64_t my_file = 0; char **info = NULL; -- cgit v1.1-32-gdbae