This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 5e4c4d739 netutils/dhcpd: fixed simusb build issue
5e4c4d739 is described below

commit 5e4c4d7393011f69c760b17fcdddd2f1207393de
Author: zhangyuan21 <[email protected]>
AuthorDate: Wed Mar 1 18:26:46 2023 +0800

    netutils/dhcpd: fixed simusb build issue
    
    define dhcpd_arpupdate when CONFIG_NETUTILS_DHCPD_IGNOREBROADCAST undef
    
    Signed-off-by: zhangyuan21 <[email protected]>
---
 netutils/dhcpd/dhcpd.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/netutils/dhcpd/dhcpd.c b/netutils/dhcpd/dhcpd.c
index 4e39119d6..79fcc7cd1 100644
--- a/netutils/dhcpd/dhcpd.c
+++ b/netutils/dhcpd/dhcpd.c
@@ -308,7 +308,8 @@ static struct dhcpd_daemon_s g_dhcpd_daemon =
  * Name: dhcpd_arpupdate
  ****************************************************************************/
 
-#ifndef CONFIG_NETUTILS_DHCPD_HOST
+#ifndef CONFIG_NETUTILS_DHCPD_IGNOREBROADCAST
+#  ifndef CONFIG_NETUTILS_DHCPD_HOST
 static inline void dhcpd_arpupdate(FAR uint8_t *ipaddr, FAR uint8_t *hwaddr)
 {
   struct sockaddr_in inaddr;
@@ -325,8 +326,9 @@ static inline void dhcpd_arpupdate(FAR uint8_t *ipaddr, FAR 
uint8_t *hwaddr)
 
   netlib_set_arpmapping(&inaddr, hwaddr, NULL);
 }
-#else
-#  define dhcpd_arpupdate(ipaddr,hwaddr)
+#  else
+#    define dhcpd_arpupdate(ipaddr,hwaddr)
+#  endif
 #endif
 
 /****************************************************************************

Reply via email to