diff --git a/Makefile b/Makefile index 1c1fec4..227533f 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,7 @@ $(XPERABLE): xperable-$(CROSS_BUILD).o pe-load-$(CROSS_BUILD).o fbusb-$(CROSS_BU $(CXX) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lpe-parse -lusb-1.0 pe-load-$(CROSS_BUILD).o: pe-load.cpp pe-parse/build-$(CROSS_BUILD)/pe-parser-library/libpe-parse.a - $(CXX) $(CFLAGS) -o $@ -c $< -Ipe-parse/pe-parser-library/include + $(CXX) $(CFLAGS) -std=c++14 -o $@ -c $< -Ipe-parse/pe-parser-library/include pe-parse/CMakeLists.txt: if [ -d .git ]; then git submodule update --init; \ diff --git a/fbusb.c b/fbusb.c index 50ad68c..8f1e1df 100644 --- a/fbusb.c +++ b/fbusb.c @@ -64,12 +64,14 @@ struct fbusb *fbusb_init(int vid, int pid, int iface, int epi, int epo) goto err_exit1; } +#if !defined(__APPLE__) if (libusb_kernel_driver_active(h, 0) == 1) { if (libusb_detach_kernel_driver(h, 0) != 0) { PERR("libusb_detach_kernel_driver failed\n"); goto err_exit2; } } +#endif res = libusb_claim_interface(h, iface); if (res < 0) { diff --git a/xperable.c b/xperable.c index 72267b9..79b6054 100644 --- a/xperable.c +++ b/xperable.c @@ -1150,7 +1150,7 @@ static void show_help(void) } -int main(int argc, unsigned char **argv) +int main(int argc, char **argv) { int i; int res;