From 961e7015c9f778df4829e05ff509c57574ad075f Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 12 May 2010 10:13:39 +1200 Subject: [PATCH] Make it easier to compile on Mac OS X. --- elf32.c | 6 ++++++ rf2500.c | 2 ++ 2 files changed, 8 insertions(+) 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");