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

raiden00 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 9ad4c3c39 netutils/dhcpc.h: fix the compilation error caused by 
undefined CONFIG_NETDB_DNSSERVER_NAMESERVERS
9ad4c3c39 is described below

commit 9ad4c3c39527ebb02199d332af811a3f792dca62
Author: nuttxs <[email protected]>
AuthorDate: Wed Dec 24 23:09:32 2025 +0800

    netutils/dhcpc.h: fix the compilation error caused by undefined
    CONFIG_NETDB_DNSSERVER_NAMESERVERS
    
    Provide a default value for CONFIG_NETDB_DNSSERVER_NAMESERVERS if
    CONFIG_NETDB_DNSCLIENT is not enabled
    
    Signed-off-by: nuttxs <[email protected]>
---
 include/netutils/dhcpc.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/netutils/dhcpc.h b/include/netutils/dhcpc.h
index d55fca170..0cf16907b 100644
--- a/include/netutils/dhcpc.h
+++ b/include/netutils/dhcpc.h
@@ -39,6 +39,7 @@
  * Included Files
  ****************************************************************************/
 
+#include <nuttx/config.h>
 #include <stdint.h>
 #include <netinet/in.h>
 
@@ -46,6 +47,14 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
+/* Provide a default value for CONFIG_NETDB_DNSSERVER_NAMESERVERS if
+ * CONFIG_NETDB_DNSCLIENT is not enabled.
+ */
+
+#if !defined(CONFIG_NETDB_DNSSERVER_NAMESERVERS)
+#  define CONFIG_NETDB_DNSSERVER_NAMESERVERS 1
+#endif
+
 /****************************************************************************
  * Public Types
  ****************************************************************************/

Reply via email to