Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

ideviceinstaller - Error with #ifdef HAVE_LIBIMOBILEDEVICE_1_0

#317

I realized these issues when compiling ideviceinstaller. I think they haven't been fixed yet.
In last version (1.0.1) of ideviceinstaller.c (http://cgit.sukimashita.com/ideviceinstaller.git/tree/src/idevicein...), lines 71 to 75 say:

71 #ifdef HAVE_LIBIMOBILEDEVICE_1_0
72 static void notifier(const char *notification, void *unused)
73 #else
74 static void notifier(const char *notification)
75 #endif

It should be:
71 #ifdef HAVE_LIBIMOBILEDEVICE_1_1

Because in /include/libimobiledevice/notification_proxy.h line 90 it expects a pointer to function with 2 parameters:
90 typedef void (*np_notify_cb_t) (const char *notification, void *user_data);

The same occurs in ideviceinstaller.c line 422:
422 #ifdef HAVE_LIBIMOBILEDEVICE_1_0
423 np_set_notify_callback(np, notifier, NULL);
424 #else
425 np_set_notify_callback(np, notifier);
426 #endif

It should be:
422 #ifdef HAVE_LIBIMOBILEDEVICE_1_1
because as we can see in /include/libimobiledevice/notification_proxy.h line 98, it expects 3 parameters instead of 2:
98: np_error_t np_set_notify_callback(np_client_t client, np_notify_cb_t notify_cb, void *userdata);

(sorry if my English is not very good).

Reported by Bilson PĂ©rez · February 18th, 2013 @ 06:57 PM

State: resolved
Milestone: none
Assigned to: Martin S. Martin S.

Activity

  1. Martin S.
    Martin S.
    • State changed from new to resolved
    • Tag set to ideviceinstaller
    • Assigned user set to Martin S.

    Thanks for reporting. Fixed in git master.
    This has not been noticed as HAVE_LIBIMOBILEDEVICE_1_0 is always defined if HAVE_LIBIMOBILEDEVICE_1_1 is.

    March 18th, 2013 @ 04:56 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.