Skip to content

Commit 9ad4c3c

Browse files
nuttxsraiden00pl
authored andcommitted
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 <zhaoqing.zhang@sony.com>
1 parent 85539a1 commit 9ad4c3c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎include/netutils/dhcpc.h‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,22 @@
3939
* Included Files
4040
****************************************************************************/
4141

42+
#include <nuttx/config.h>
4243
#include <stdint.h>
4344
#include <netinet/in.h>
4445

4546
/****************************************************************************
4647
* Pre-processor Definitions
4748
****************************************************************************/
4849

50+
/* Provide a default value for CONFIG_NETDB_DNSSERVER_NAMESERVERS if
51+
* CONFIG_NETDB_DNSCLIENT is not enabled.
52+
*/
53+
54+
#if !defined(CONFIG_NETDB_DNSSERVER_NAMESERVERS)
55+
# define CONFIG_NETDB_DNSSERVER_NAMESERVERS 1
56+
#endif
57+
4958
/****************************************************************************
5059
* Public Types
5160
****************************************************************************/

0 commit comments

Comments
 (0)