mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-09-03 23:53:00 +00:00
netutils: fix compile error when not defined CONFIG_NET_ETHERNET
/home/ligd/platform/dev/apps/netutils/netlib/netlib_obtainipv4addr.c:117: undefined reference to `netlib_getmacaddr' Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
f8341ab94d
commit
da83750cd3
1 changed files with 6 additions and 1 deletions
|
|
@ -112,14 +112,19 @@ static int dhcp_obtain_statefuladdr(FAR const char *ifname)
|
|||
{
|
||||
struct dhcpc_state ds;
|
||||
FAR void *handle;
|
||||
int ret;
|
||||
uint8_t mac[IFHWADDRLEN];
|
||||
|
||||
int ret = netlib_getmacaddr(ifname, mac);
|
||||
#ifdef CONFIG_NET_ETHERNET
|
||||
ret = netlib_getmacaddr(ifname, mac);
|
||||
if (ret < 0)
|
||||
{
|
||||
nerr("ERROR: get MAC address failed for '%s' : %d\n", ifname, ret);
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
bzero(mac, sizeof(mac));
|
||||
#endif
|
||||
|
||||
/* Set up the DHCPC modules */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue