We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8341ab commit da83750Copy full SHA for da83750
netutils/netlib/netlib_obtainipv4addr.c
@@ -112,14 +112,19 @@ static int dhcp_obtain_statefuladdr(FAR const char *ifname)
112
{
113
struct dhcpc_state ds;
114
FAR void *handle;
115
+ int ret;
116
uint8_t mac[IFHWADDRLEN];
117
- int ret = netlib_getmacaddr(ifname, mac);
118
+#ifdef CONFIG_NET_ETHERNET
119
+ ret = netlib_getmacaddr(ifname, mac);
120
if (ret < 0)
121
122
nerr("ERROR: get MAC address failed for '%s' : %d\n", ifname, ret);
123
return ret;
124
}
125
+#else
126
+ bzero(mac, sizeof(mac));
127
+#endif
128
129
/* Set up the DHCPC modules */
130
0 commit comments