diff --git a/elf32.c b/elf32.c index 7a867eb..488baf9 100644 --- a/elf32.c +++ b/elf32.c @@ -19,10 +19,16 @@ #include #include #include +#ifdef __APPLE__ +#include +#else #include +#endif #include "binfile.h" +#ifndef EM_MSP430 #define EM_MSP430 0x69 +#endif static const u_int8_t elf32_id[] = { ELFMAG0, ELFMAG1, ELFMAG2, ELFMAG3, ELFCLASS32 diff --git a/rf2500.c b/rf2500.c index 5a55317..02cb19d 100644 --- a/rf2500.c +++ b/rf2500.c @@ -65,9 +65,11 @@ static int open_interface(struct rf2500_transport *tr, return -1; } +#ifndef __APPLE__ if (usb_detach_kernel_driver_np(tr->handle, tr->int_number) < 0) perror("rf2500: warning: can't " "detach kernel driver"); +#endif if (usb_claim_interface(tr->handle, tr->int_number) < 0) { perror("rf2500: can't claim interface");