diff options
Diffstat (limited to 'src/ideviceinstaller.c')
| -rw-r--r-- | src/ideviceinstaller.c | 12 |
1 files changed, 11 insertions, 1 deletions
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 @@ | |||
| 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 | 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 |
| 21 | * USA | 21 | * USA |
| 22 | */ | 22 | */ |
| 23 | #ifdef HAVE_CONFIG_H | ||
| 24 | #include <config.h> | ||
| 25 | #endif | ||
| 23 | #include <stdlib.h> | 26 | #include <stdlib.h> |
| 24 | #define _GNU_SOURCE 1 | 27 | #define _GNU_SOURCE 1 |
| 25 | #define __USE_GNU 1 | 28 | #define __USE_GNU 1 |
| @@ -62,8 +65,11 @@ int op_completed = 0; | |||
| 62 | int err_occured = 0; | 65 | int err_occured = 0; |
| 63 | int notified = 0; | 66 | int notified = 0; |
| 64 | 67 | ||
| 65 | 68 | #ifdef HAVE_LIBIMOBILEDEVICE_1_0 | |
| 66 | static void notifier(const char *notification, void *unused) | 69 | static void notifier(const char *notification, void *unused) |
| 70 | #else | ||
| 71 | static void notifier(const char *notification) | ||
| 72 | #endif | ||
| 67 | { | 73 | { |
| 68 | /* printf("notification received: %s\n", notification);*/ | 74 | /* printf("notification received: %s\n", notification);*/ |
| 69 | notified = 1; | 75 | notified = 1; |
| @@ -348,7 +354,11 @@ int main(int argc, char **argv) | |||
| 348 | goto leave_cleanup; | 354 | goto leave_cleanup; |
| 349 | } | 355 | } |
| 350 | 356 | ||
| 357 | #ifdef HAVE_LIBIMOBILEDEVICE_1_0 | ||
| 351 | np_set_notify_callback(np, notifier, NULL); | 358 | np_set_notify_callback(np, notifier, NULL); |
| 359 | #else | ||
| 360 | np_set_notify_callback(np, notifier); | ||
| 361 | #endif | ||
| 352 | 362 | ||
| 353 | const char *noties[3] = { NP_APP_INSTALLED, NP_APP_UNINSTALLED, NULL }; | 363 | const char *noties[3] = { NP_APP_INSTALLED, NP_APP_UNINSTALLED, NULL }; |
| 354 | 364 | ||
