yamt commented on a change in pull request #2869:
URL: https://github.com/apache/incubator-nuttx/pull/2869#discussion_r579260425
##########
File path: include/netdb.h
##########
@@ -156,6 +156,28 @@
#define NO_RECOVERY 3
#define TRY_AGAIN 4
+/* NI_MAXHOST is the max of
+ *
+ * CONFIG_NETDB_DNSCLIENT_NAMESIZE + 1
+ * INET6_ADDRSTRLEN
+ * INET_ADDRSTRLEN
+ *
+ * Note: INETxxx_ADDRSTRLEN already includes the terminating NUL.
+ * Note: INET6_ADDRSTRLEN > INET_ADDRSTRLEN is assumed.
+ */
+
+#if CONFIG_NETDB_DNSCLIENT_NAMESIZE > INET6_ADDRSTRLEN
+#define NI_MAXHOST CONFIG_NETDB_DNSCLIENT_NAMESIZE
+#else
+#define NI_MAXHOST INET6_ADDRSTRLEN
Review comment:
i fixed config checks here
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]