commit 3e8d3e0e0fb69b6bf0480318d006ece1f8fc5750
Author: Christophe Fergeau <[email protected]>
Date: Mon Dec 21 11:49:32 2009 +0100
make sure itdb_sqlite can be compiled without libiphone
The sqlite code is useful for the nano5g which doesn't need libiphone at
all.
configure.ac | 4 +++-
src/itdb_sqlite.c | 8 +++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 760b0b5..00269fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,7 +59,9 @@ AC_PROG_INTLTOOL([0.21])
AC_CHECK_FUNCS([localtime_r])
AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include <time.h>])
-PKG_CHECK_MODULES(LIBGPOD, glib-2.0 >= 2.8.0 gobject-2.0 sqlite3)
+dnl sqlite3 is needed for newer ipod models (nano5g), and libplist is needed
+dnl by libgpod sqlite code
+PKG_CHECK_MODULES(LIBGPOD, glib-2.0 >= 2.8.0 gobject-2.0 sqlite3 libplist)
dnl **************************************************
dnl we've copied gchecksum from glib 2.16. Only use the
diff --git a/src/itdb_sqlite.c b/src/itdb_sqlite.c
index e5e9122..fa83619 100644
--- a/src/itdb_sqlite.c
+++ b/src/itdb_sqlite.c
@@ -31,9 +31,12 @@
#include <glib.h>
#include <glib/gstdio.h>
#include <sqlite3.h>
+#include <plist/plist.h>
+#ifdef HAVE_LIBIPHONE
#include <libiphone/libiphone.h>
#include <libiphone/lockdown.h>
+#endif
#include "itdb.h"
#include "itdb_private.h"
@@ -1351,6 +1354,7 @@ static void run_post_process_commands(Itdb_iTunesDB
*itdb, const char *outpath,
int res;
sqlite3 *db = NULL;
+#ifdef HAVE_LIBIPHONE
if (itdb_device_is_iphone_family(itdb->device)) {
/* get SQL post process commands via lockdown (iPhone/iPod Touch) */
lockdownd_client_t client = NULL;
@@ -1382,7 +1386,9 @@ static void run_post_process_commands(Itdb_iTunesDB
*itdb, const char *outpath,
plist_node = NULL;
}
}
- } else if (itdb->device->sysinfo_extended != NULL) {
+ } else
+#endif
+ if (itdb->device->sysinfo_extended != NULL) {
/* try to get SQL post process commands via sysinfo_extended */
gchar *dev_path = itdb_get_device_dir (itdb->device->mountpoint);
if (dev_path) {
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2