Preprocessor related fix-ups.
- olimex.c, rf2500.c, uif.c: add missing includes for malloc(), free() and atoi(). - uif.c: define serial port speeds based on need, not platform. - uif.c: if !__linux__, stub open_olimex_iso() is not needed.
This commit is contained in:
parent
49ed2bb990
commit
ea0c4d6720
1
olimex.c
1
olimex.c
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <usb.h>
|
||||
|
||||
|
|
1
rf2500.c
1
rf2500.c
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <usb.h>
|
||||
|
||||
|
|
11
uif.c
11
uif.c
|
@ -36,8 +36,10 @@
|
|||
#include "util.h"
|
||||
#include "output.h"
|
||||
|
||||
#if defined(__APPLE__) || defined(__OpenBSD__)
|
||||
#ifndef B460800
|
||||
#define B460800 460800
|
||||
#endif
|
||||
#ifndef B500000
|
||||
#define B500000 500000
|
||||
#endif
|
||||
|
||||
|
@ -116,13 +118,6 @@ static int open_olimex_iso(const char *device)
|
|||
|
||||
return fd;
|
||||
}
|
||||
#else
|
||||
static int open_olimex_iso(const char *device)
|
||||
{
|
||||
printc_err("open_olimex_iso: this driver is only supported on "
|
||||
"Linux\n");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
transport_t uif_open(const char *device, uif_type_t type)
|
||||
|
|
Loading…
Reference in New Issue