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 <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <libelf.h>
|
||||||
|
#else
|
||||||
#include <elf.h>
|
#include <elf.h>
|
||||||
|
#endif
|
||||||
#include "binfile.h"
|
#include "binfile.h"
|
||||||
|
|
||||||
|
#ifndef EM_MSP430
|
||||||
#define EM_MSP430 0x69
|
#define EM_MSP430 0x69
|
||||||
|
#endif
|
||||||
|
|
||||||
static const u_int8_t elf32_id[] = {
|
static const u_int8_t elf32_id[] = {
|
||||||
ELFMAG0, ELFMAG1, ELFMAG2, ELFMAG3, ELFCLASS32
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __APPLE__
|
||||||
if (usb_detach_kernel_driver_np(tr->handle, tr->int_number) < 0)
|
if (usb_detach_kernel_driver_np(tr->handle, tr->int_number) < 0)
|
||||||
perror("rf2500: warning: can't "
|
perror("rf2500: warning: can't "
|
||||||
"detach kernel driver");
|
"detach kernel driver");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (usb_claim_interface(tr->handle, tr->int_number) < 0) {
|
if (usb_claim_interface(tr->handle, tr->int_number) < 0) {
|
||||||
perror("rf2500: can't claim interface");
|
perror("rf2500: can't claim interface");
|
||||||
|
|
Loading…
Reference in New Issue