Feature/router bsd (#821)
* fix router compile warnings declaration-after-statement overlength-strings * router disable PRINT(debug_level) * ports rename dlmstp_[linux|bsd] to dlmstp_port * copy ports/linux/dlmstp_port.c ports/bsd/dlmstp_port.c * copy ports/linux/dlmstp_port.c ports/bsd/dlmstp_port.c * fix typedef in bip_get_local_address_ioctl * copy ports/linux/dlmstp_port.c ports/bsd/dlmstp_port.c * add bsd support for router app * fix clang __attribute__ optimize dont work clang O2/O3/Os are also not working * fix pre-commit * fix bsd SO_BINDTODEVICE is not available * add brew install libconfig for app router and bsd * fix BACDL_MSTP test on macOS * remove old comments
This commit is contained in:
@@ -24,7 +24,7 @@ uint8_t test_packet[] = { 0x81, 0x0a, 0x00, 0x16, /* BVLC header */
|
||||
|
||||
/* BUG with optimize Os */
|
||||
/* *** bit out of range 0 - FD_SETSIZE on fd_set ***: terminated */
|
||||
void __attribute__((optimize("O2"))) * dl_ip_thread(void *pArgs)
|
||||
void *dl_ip_thread(void *pArgs)
|
||||
{
|
||||
MSGBOX_ID msgboxid;
|
||||
BACMSG msg_storage, *bacmsg = NULL;
|
||||
@@ -260,7 +260,7 @@ int dl_ip_recv(
|
||||
struct timeval select_timeout;
|
||||
struct sockaddr_in sin = { 0 };
|
||||
socklen_t sin_len = sizeof(sin);
|
||||
|
||||
int ret;
|
||||
/* make sure the socket is open */
|
||||
if (data->socket < 0) {
|
||||
return 0;
|
||||
@@ -284,7 +284,7 @@ int dl_ip_recv(
|
||||
sin.sin_addr.s_addr = 0x7E1D40A;
|
||||
sin.sin_port = 0xC0BA;
|
||||
#else
|
||||
int ret = select(data->socket + 1, &read_fds, NULL, NULL, &select_timeout);
|
||||
ret = select(data->socket + 1, &read_fds, NULL, NULL, &select_timeout);
|
||||
/* see if there is a packet for us */
|
||||
if (ret > 0) {
|
||||
received_bytes = recvfrom(
|
||||
|
||||
Reference in New Issue
Block a user