Fixed missing #includes and restricted linuxradiodrv compilation to linux
This commit is contained in:
parent
43a327df5a
commit
52c90519d9
|
@ -35,11 +35,15 @@
|
|||
|
||||
#include "contiki.h"
|
||||
|
||||
#ifdef linux
|
||||
|
||||
#include "linuxradio-drv.h"
|
||||
|
||||
#include "net/packetbuf.h"
|
||||
#include "net/netstack.h"
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
@ -145,6 +149,7 @@ handle_fd(fd_set *rset, fd_set *wset)
|
|||
NETSTACK_RDC.input();
|
||||
}
|
||||
}
|
||||
|
||||
static const struct select_callback linuxradio_sock_callback = { set_fd, handle_fd };
|
||||
|
||||
static int
|
||||
|
@ -199,3 +204,5 @@ const struct radio_driver linuxradio_driver =
|
|||
on,
|
||||
off,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -36,6 +36,12 @@
|
|||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
|
||||
struct select_callback {
|
||||
int (* set_fd)(fd_set *fdr, fd_set *fdw);
|
||||
void (* handle_fd)(fd_set *fdr, fd_set *fdw);
|
||||
};
|
||||
int select_set_callback(int fd, const struct select_callback *callback);
|
||||
|
||||
#define CC_CONF_REGISTER_ARGS 1
|
||||
#define CC_CONF_FUNCTION_POINTER_ARGS 1
|
||||
#define CC_CONF_FASTCALL
|
||||
|
|
Loading…
Reference in a new issue