From ec581ace70ecf8cfb13d0baa15d27391b2907e14 Mon Sep 17 00:00:00 2001 From: skarg Date: Thu, 24 Sep 2015 21:51:29 +0000 Subject: [PATCH] cleaned up warnings from BACnet Ethernet 8802.3 compile on Linux --- bacnet-stack/include/ethernet.h | 8 ++++++++ bacnet-stack/ports/linux/ethernet.c | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/bacnet-stack/include/ethernet.h b/bacnet-stack/include/ethernet.h index 59eec1bc..a2c918e5 100644 --- a/bacnet-stack/include/ethernet.h +++ b/bacnet-stack/include/ethernet.h @@ -68,6 +68,14 @@ extern "C" { void ethernet_get_broadcast_address( BACNET_ADDRESS * dest); /* destination address */ + /* some functions from Linux driver */ + void ethernet_debug_address( + const char *info, + BACNET_ADDRESS * dest); + int ethernet_send( + uint8_t * mtu, + int mtu_len); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/bacnet-stack/ports/linux/ethernet.c b/bacnet-stack/ports/linux/ethernet.c index 3caf3dd7..a909eec5 100644 --- a/bacnet-stack/ports/linux/ethernet.c +++ b/bacnet-stack/ports/linux/ethernet.c @@ -70,10 +70,11 @@ void ethernet_cleanup( return; } +#if 0 /*---------------------------------------------------------------------- Portable function to set a socket into nonblocking mode. Calling this on a socket causes all future read() and write() calls on - that socket to do only as much as they can immediately, and return + that socket to do only as much as they can immediately, and return without waiting. If no data can be read or written, they return -1 and set errno to EAGAIN (or EWOULDBLOCK). @@ -88,6 +89,7 @@ int setNonblocking( flags = 0; return fcntl(fd, F_SETFL, flags | O_NONBLOCK); } +#endif /* opens an 802.2 socket to receive and send packets */ static int ethernet_bind( @@ -95,7 +97,9 @@ static int ethernet_bind( char *interface_name) { int sock_fd = -1; /* return value */ +#if 0 int sockopt = 0; +#endif int uid = 0; fprintf(stderr, "ethernet: opening \"%s\"\n", interface_name);