Book:whsniff-1.1 istitch07$ make
mkdir -p obj
cc -c src/whsniff.c -o obj/whsniff.o -I.
src/whsniff.c:19:10: fatal error: 'endian.h' file not found
#include <endian.h> /* htole16, htole32, le32toh */
^~~~~~~~~~
1 error generated.
make: *** [obj/whsniff.o] Error 1
Book:whsniff-1.1 istitch07$ make
cc -c src/whsniff.c -o obj/whsniff.o -I.
src/whsniff.c:103:12: warning: implicit declaration of function 'le16toh' is invalid in C99 [-Wimplicit-function-declaration]
usb_len = le16toh(usb_header->le_usb_len);
^
src/whsniff.c:124:36: warning: implicit declaration of function 'le32toh' is invalid in C99 [-Wimplicit-function-declaration]
timestamp_us = (timestamp_tick + le32toh(usb_data_header->le_timestamp)) / 32;
^
src/whsniff.c:149:12: warning: implicit declaration of function 'htole16' is invalid in C99 [-Wimplicit-function-declaration]
le_fcs = htole16(fcs);
^
src/whsniff.c:235:2: warning: 'libusb_set_debug' is deprecated [-Wdeprecated-declarations]
libusb_set_debug(NULL, 3);
^
/usr/local/include/libusb-1.0/libusb.h:1324:1: note: 'libusb_set_debug' has been explicitly marked deprecated here
LIBUSB_DEPRECATED_FOR(libusb_set_option)
^
/usr/local/include/libusb-1.0/libusb.h:89:49: note: expanded from macro 'LIBUSB_DEPRECATED_FOR'
#define LIBUSB_DEPRECATED_FOR(f) __attribute__((deprecated))
^
4 warnings generated.
cc -o whsniff obj/whsniff.o -lusb-1.0 -lrt
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [whsniff] Error 1