diff options
| -rw-r--r-- | configure.ac | 9 | ||||
| -rw-r--r-- | src/preflight.c | 9 |
2 files changed, 15 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index d0c8201..fb59203 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -35,6 +35,15 @@ if test "x$have_limd" = "xyes"; then | |||
| 35 | AC_DEFINE(HAVE_LIBIMOBILEDEVICE, 1, [Define if you have libimobiledevice support]) | 35 | AC_DEFINE(HAVE_LIBIMOBILEDEVICE, 1, [Define if you have libimobiledevice support]) |
| 36 | AC_SUBST(libimobiledevice_CFLAGS) | 36 | AC_SUBST(libimobiledevice_CFLAGS) |
| 37 | AC_SUBST(libimobiledevice_LIBS) | 37 | AC_SUBST(libimobiledevice_LIBS) |
| 38 | AC_CACHE_CHECK(for enum idevice_connection_type, ac_cv_enum_idevice_connection_type, | ||
| 39 | AC_TRY_COMPILE([ | ||
| 40 | #include <libimobiledevice/libimobiledevice.h> | ||
| 41 | ], [ | ||
| 42 | enum idevice_connection_type conn_type = CONNECTION_USBMUXD; | ||
| 43 | ], ac_cv_enum_idevice_connection_type=yes, ac_cv_enum_idevice_connection_type=no)) | ||
| 44 | if (test "$ac_cv_enum_idevice_connection_type" = "yes"); then | ||
| 45 | AC_DEFINE(HAVE_ENUM_IDEVICE_CONNECTION_TYPE, 1, [Define if enum idevice_connection_type is available]) | ||
| 46 | fi | ||
| 38 | fi | 47 | fi |
| 39 | else | 48 | else |
| 40 | if test "x$with_preflight" == "xyes"; then | 49 | if test "x$with_preflight" == "xyes"; then |
diff --git a/src/preflight.c b/src/preflight.c index 86a51cf..c7cfa50 100644 --- a/src/preflight.c +++ b/src/preflight.c | |||
| @@ -43,14 +43,17 @@ | |||
| 43 | #include "log.h" | 43 | #include "log.h" |
| 44 | 44 | ||
| 45 | #ifdef HAVE_LIBIMOBILEDEVICE | 45 | #ifdef HAVE_LIBIMOBILEDEVICE |
| 46 | enum connection_type { | 46 | #ifndef HAVE_ENUM_IDEVICE_CONNECTION_TYPE |
| 47 | CONNECTION_USBMUXD = 1 | 47 | enum idevice_connection_type { |
| 48 | CONNECTION_USBMUXD = 1, | ||
| 49 | CONNECTION_NETWORK | ||
| 48 | }; | 50 | }; |
| 51 | #endif | ||
| 49 | 52 | ||
| 50 | struct idevice_private { | 53 | struct idevice_private { |
| 51 | char *udid; | 54 | char *udid; |
| 52 | uint32_t mux_id; | 55 | uint32_t mux_id; |
| 53 | enum connection_type conn_type; | 56 | enum idevice_connection_type conn_type; |
| 54 | void *conn_data; | 57 | void *conn_data; |
| 55 | int version; | 58 | int version; |
| 56 | }; | 59 | }; |
