[riot-notifications] [RIOT-OS/RIOT] netutils: add netutils_parse_hostname() (#16634)

benpicco notifications at github.com
Tue Jul 20 19:51:42 CEST 2021


@benpicco commented on this pull request.



> + * @{
+ *
+ * @file
+ * @brief       Mock implementation of sock_dns
+ *
+ * @author      Benjamin Valentin <benjamin.valentin at ml-pa.com>
+ */
+#include <string.h>
+
+#include "net/af.h"
+#include "net/ipv6/addr.h"
+#include "net/sock/dns.h"
+
+int sock_dns_query(const char *domain_name, void *addr_out, int family)
+{
+    const ipv6_addr_t a = { {

`const` should always go to .text / ROM, not on the stack.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16634#discussion_r673355419
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210720/3a4c2b17/attachment.htm>


More information about the notifications mailing list