Make it easier to compile on Mac OS X.
This commit is contained in:
parent
5b943536e4
commit
961e7015c9
6
elf32.c
6
elf32.c
|
@ -19,10 +19,16 @@
|
|||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#ifdef __APPLE__
|
||||
#include <libelf.h>
|
||||
#else
|
||||
#include <elf.h>
|
||||
#endif
|
||||
#include "binfile.h"
|
||||
|
||||
#ifndef EM_MSP430
|
||||
#define EM_MSP430 0x69
|
||||
#endif
|
||||
|
||||
static const u_int8_t elf32_id[] = {
|
||||
ELFMAG0, ELFMAG1, ELFMAG2, ELFMAG3, ELFCLASS32
|
||||
|
|
2
rf2500.c
2
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");
|
||||
|
|
Loading…
Reference in New Issue