simplelink: net: tweaks to SlNetSock to prevent build errors/warnings

Minor tweaks to the SlNetSock code to avoid errors/warnings
when building for Zephyr, due to its stricter build flags and its
idiosyncrasies around its posix implementations.

Signed-off-by: Vincent Wan <vwan@ti.com>
This commit is contained in:
Vincent Wan 2020-08-12 13:58:09 -07:00 committed by Carles Cufí
parent 13267bea30
commit adb7027102
3 changed files with 10 additions and 2 deletions

View File

@ -436,7 +436,7 @@ int32_t matchModeByRole(SlNetIfAddressType_e addrType,
{
SlWlanConnStatusParam_t WlanConnectInfo;
uint16_t Len;
int32_t retVal;
int32_t retVal = SLNETERR_RET_CODE_OK; /* prevent build warning */
switch(addrType)
{

View File

@ -46,7 +46,8 @@
#include <ti/net/slneterr.h>
/* POSIX Header files */
#include <semaphore.h>
/* Changed include path to match Zephyr posix */
#include <posix/semaphore.h>
/*****************************************************************************/
/* Macro declarations */

View File

@ -191,7 +191,14 @@ interface. Some are mandatory, others are optional (but recommended).
#define __SL_NET_SOCK_H__
#include <stdint.h>
/*
* Commented out to prevent zsock_timeval from being redefined
* Can remove this if support for CONFIG_NET_SOCKETS_POSIX_NAMES
* is dropped someday
*/
#ifndef CONFIG_NET_SOCKETS_POSIX_NAMES
#include <sys/time.h>
#endif
#ifdef __cplusplus
extern "C" {