diff options
| -rw-r--r-- | CMakeLists.txt | 4 | ||||
| -rw-r--r-- | Modules/FindUSB.cmake | 15 | ||||
| -rw-r--r-- | daemon/main.c | 2 | ||||
| -rw-r--r-- | tools/iproxy.c | 1 |
4 files changed, 16 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 93fa715..8ed2e37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -13,7 +13,7 @@ set(LIBUSBMUXD_SOVERSION "1") | |||
| 13 | message("-- Configuring usbmuxd v${VERSION_TAG}") | 13 | message("-- Configuring usbmuxd v${VERSION_TAG}") |
| 14 | 14 | ||
| 15 | if(NOT DEFINED LIB_SUFFIX) | 15 | if(NOT DEFINED LIB_SUFFIX) |
| 16 | if(CMAKE_SIZEOF_VOID_P EQUAL 8) | 16 | if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux") |
| 17 | set(LIB_SUFFIX "64" CACHE STRING "Define suffix of library directory name (32/64)" ) | 17 | set(LIB_SUFFIX "64" CACHE STRING "Define suffix of library directory name (32/64)" ) |
| 18 | else() | 18 | else() |
| 19 | set(LIB_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) | 19 | set(LIB_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) |
| @@ -67,7 +67,7 @@ add_definitions(-Wall) | |||
| 67 | add_subdirectory (libusbmuxd) | 67 | add_subdirectory (libusbmuxd) |
| 68 | if (WITH_USBMUXD) | 68 | if (WITH_USBMUXD) |
| 69 | add_subdirectory (daemon) | 69 | add_subdirectory (daemon) |
| 70 | if (NOT WIN32 AND NOT APPLE) | 70 | if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") |
| 71 | add_subdirectory (udev) | 71 | add_subdirectory (udev) |
| 72 | endif() | 72 | endif() |
| 73 | endif() | 73 | endif() |
diff --git a/Modules/FindUSB.cmake b/Modules/FindUSB.cmake index d1d705a..486864f 100644 --- a/Modules/FindUSB.cmake +++ b/Modules/FindUSB.cmake | |||
| @@ -9,8 +9,17 @@ include(LibFindMacros) | |||
| 9 | 9 | ||
| 10 | # Dependencies | 10 | # Dependencies |
| 11 | 11 | ||
| 12 | # Use pkg-config to get hints about paths | 12 | # pkg-config + libusb fails on FreeBSD, though libusb is in base |
| 13 | libfind_pkg_check_modules(USB_PKGCONF libusb-1.0>=1.0.3) | 13 | if(NOT(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")) |
| 14 | # Use pkg-config to get hints about paths | ||
| 15 | libfind_pkg_check_modules(USB_PKGCONF libusb-1.0>=1.0.3) | ||
| 16 | # We want to look for libusb-1.0 | ||
| 17 | set(USB_LIBRARY_NAME usb-1.0) | ||
| 18 | else() | ||
| 19 | set(USB_PKGCONF_INCLUDE_DIRS /usr/include) | ||
| 20 | set(USB_PKGCONF_LIBRARY_DIRS /usr/lib) | ||
| 21 | set(USB_LIBRARY_NAME usb) | ||
| 22 | endif() | ||
| 14 | 23 | ||
| 15 | # Include dir | 24 | # Include dir |
| 16 | find_path(USB_INCLUDE_DIR | 25 | find_path(USB_INCLUDE_DIR |
| @@ -20,7 +29,7 @@ find_path(USB_INCLUDE_DIR | |||
| 20 | 29 | ||
| 21 | # Finally the library itself | 30 | # Finally the library itself |
| 22 | find_library(USB_LIBRARY | 31 | find_library(USB_LIBRARY |
| 23 | NAMES usb-1.0 | 32 | NAMES ${USB_LIBRARY_NAME} |
| 24 | PATHS ${USB_PKGCONF_LIBRARY_DIRS} | 33 | PATHS ${USB_PKGCONF_LIBRARY_DIRS} |
| 25 | ) | 34 | ) |
| 26 | 35 | ||
diff --git a/daemon/main.c b/daemon/main.c index 789a202..140bee1 100644 --- a/daemon/main.c +++ b/daemon/main.c | |||
| @@ -147,7 +147,7 @@ void set_signal_handlers(void) | |||
| 147 | sigaction(SIGUSR2, &sa, NULL); | 147 | sigaction(SIGUSR2, &sa, NULL); |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | #ifdef __APPLE__ | 150 | #if defined(__FreeBSD__) || defined(__APPLE__) |
| 151 | static int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout, const sigset_t *sigmask) | 151 | static int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout, const sigset_t *sigmask) |
| 152 | { | 152 | { |
| 153 | int ready; | 153 | int ready; |
diff --git a/tools/iproxy.c b/tools/iproxy.c index 1855c67..4469c48 100644 --- a/tools/iproxy.c +++ b/tools/iproxy.c | |||
| @@ -42,6 +42,7 @@ typedef unsigned int socklen_t; | |||
| 42 | #include <arpa/inet.h> | 42 | #include <arpa/inet.h> |
| 43 | #endif | 43 | #endif |
| 44 | #include <pthread.h> | 44 | #include <pthread.h> |
| 45 | #include <netinet/in.h> | ||
| 45 | #include "sock_stuff.h" | 46 | #include "sock_stuff.h" |
| 46 | #include "usbmuxd.h" | 47 | #include "usbmuxd.h" |
| 47 | 48 | ||
