From 76de20d18914577936e6cfce1747c04b4facb78b Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 1 Apr 2010 02:55:54 +0200 Subject: Allow compiling with libimobiledevice < 1.0.0 again --- src/ideviceinstaller.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c index ab62809..d13fdb9 100644 --- a/src/ideviceinstaller.c +++ b/src/ideviceinstaller.c @@ -20,6 +20,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #define _GNU_SOURCE 1 #define __USE_GNU 1 @@ -62,8 +65,11 @@ int op_completed = 0; int err_occured = 0; int notified = 0; - +#ifdef HAVE_LIBIMOBILEDEVICE_1_0 static void notifier(const char *notification, void *unused) +#else +static void notifier(const char *notification) +#endif { /* printf("notification received: %s\n", notification);*/ notified = 1; @@ -348,7 +354,11 @@ int main(int argc, char **argv) goto leave_cleanup; } +#ifdef HAVE_LIBIMOBILEDEVICE_1_0 np_set_notify_callback(np, notifier, NULL); +#else + np_set_notify_callback(np, notifier); +#endif const char *noties[3] = { NP_APP_INSTALLED, NP_APP_UNINSTALLED, NULL }; -- cgit v1.1-32-gdbae