summaryrefslogtreecommitdiffstats
path: root/usbmuxd
diff options
context:
space:
mode:
Diffstat (limited to 'usbmuxd')
-rw-r--r--usbmuxd/CMakeLists.txt21
-rw-r--r--usbmuxd/usb-linux.c11
2 files changed, 20 insertions, 12 deletions
diff --git a/usbmuxd/CMakeLists.txt b/usbmuxd/CMakeLists.txt
index 7d0d3d8..f95727c 100644
--- a/usbmuxd/CMakeLists.txt
+++ b/usbmuxd/CMakeLists.txt
@@ -6,8 +6,27 @@ include_directories (${CMAKE_SOURCE_DIR}/common)
6include_directories (${CMAKE_SOURCE_DIR}/usbmuxd) 6include_directories (${CMAKE_SOURCE_DIR}/usbmuxd)
7include_directories (${CMAKE_SOURCE_DIR}/libusbmuxd) 7include_directories (${CMAKE_SOURCE_DIR}/libusbmuxd)
8 8
9include(CheckConstantExists)
10set(CMAKE_REQUIRED_INCLUDES ${USB_INCLUDE_DIRS})
11check_constant_exists(LIBUSB_TRANSFER_ZERO_PACKET libusb.h HAVE_LIBUSB_ZLP)
12
13if(NOT HAVE_LIBUSB_ZLP)
14 message("
15================================================================================
16==================================== WARNING ===================================
17================================================================================
18Your libusb is missing proper Zero Length Packet support! If you are using a
19recent libusb Git, things may or may not work. If you are using libusb 1.0.2 or
20earlier, things will definitely not work properly.
21
22Please apply the patch in the contrib/ directory to your libusb 1.0 tree.
23================================================================================
24")
25 add_definitions(-DEXPLICIT_ZLP_TRANSACTION)
26endif(NOT HAVE_LIBUSB_ZLP)
27
9add_definitions(-Wall -O2 -g -DUSBMUXD_DAEMON) 28add_definitions(-Wall -O2 -g -DUSBMUXD_DAEMON)
10add_executable(usbmuxd main.c usb-linux.c log.c ../common/utils.c device.c client.c) 29add_executable(usbmuxd main.c usb-linux.c log.c ../common/utils.c device.c client.c)
11target_link_libraries(usbmuxd ${LIBS}) 30target_link_libraries(usbmuxd ${LIBS})
12 31
13install(TARGETS usbmuxd RUNTIME DESTINATION sbin) \ No newline at end of file 32install(TARGETS usbmuxd RUNTIME DESTINATION sbin)
diff --git a/usbmuxd/usb-linux.c b/usbmuxd/usb-linux.c
index 2d6053e..c09cdc9 100644
--- a/usbmuxd/usb-linux.c
+++ b/usbmuxd/usb-linux.c
@@ -33,17 +33,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33#include "log.h" 33#include "log.h"
34#include "device.h" 34#include "device.h"
35 35
36#ifndef LIBUSB_TRANSFER_ZERO_PACKET
37#warning Your libusb is missing proper Zero Length Packet support!
38#warning
39#warning If you are using a recent libusb Git, things may or may not work.
40#warning If you are using libusb 1.0.2 or earlier, things will definitely not work
41#warning properly.
42#warning
43#warning Please apply the patch in the contrib/ directory to your libusb 1.0 tree.
44#define EXPLICIT_ZLP_TRANSACTION
45#endif
46
47// interval for device connection/disconnection polling, in milliseconds 36// interval for device connection/disconnection polling, in milliseconds
48// we need this because there is currently no asynchronous device discovery mechanism in libusb 37// we need this because there is currently no asynchronous device discovery mechanism in libusb
49#define DEVICE_POLL_TIME 1000 38#define DEVICE_POLL_TIME 1000