diff options
author | Daniel Drake <dan@reactivated.net> | 2010-06-25 12:01:58 -0500 |
---|---|---|
committer | Daniel Drake <dan@reactivated.net> | 2010-06-25 12:01:58 -0500 |
commit | 7211aba6e290f9805e911959b2a43a4b3ec56d4f (patch) | |
tree | a82f19cb66ea0cf4ba698ef8df49a008b399f236 /libusb/libusb.h | |
parent | b33c3cb9651459de1f3d549677cbac67a017a295 (diff) | |
download | android_external_libusbx-7211aba6e290f9805e911959b2a43a4b3ec56d4f.tar.gz android_external_libusbx-7211aba6e290f9805e911959b2a43a4b3ec56d4f.tar.bz2 android_external_libusbx-7211aba6e290f9805e911959b2a43a4b3ec56d4f.zip |
Only include sys/time.h on appropriate platforms
This header doesn't exist on windows.
For libusb, determine at configure-time if the header is available.
For libusb.h, use gcc predefined macros to only include the header
on platforms that need it.
Diffstat (limited to 'libusb/libusb.h')
-rw-r--r-- | libusb/libusb.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libusb/libusb.h b/libusb/libusb.h index 623c6bc..9f298d3 100644 --- a/libusb/libusb.h +++ b/libusb/libusb.h @@ -22,11 +22,14 @@ #define __LIBUSB_H__ #include <stdint.h> -#include <sys/time.h> #include <sys/types.h> #include <time.h> #include <limits.h> +#if defined(__linux) || defined(__APPLE__) +#include <sys/time.h> +#endif + #ifdef __cplusplus extern "C" { #endif |