summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKinsey Moore <kinsey.moore@oarcorp.com>2024-02-28 12:28:20 -0600
committerJoel Sherrill <joel@rtems.org>2024-03-05 08:50:18 -0600
commit09f628527c589eccca5b8f8811ffe717c1f10db0 (patch)
tree99eda1cc51e3c94e67941dc0cadfd6ec9c85e42b
parentrtemslwip: Move ZynqMP servicing thread to core 0 (diff)
downloadrtems-lwip-master.tar.bz2
rtemslwip: Add gethostbyname wrapperHEADmaster
Applications and libraries compiled without the benefit of the lwIP headers may require gethostbyname() instead of lwip_gethostbyname(). This wrapper allows those applicationns and libraries to link properly.
-rw-r--r--rtemslwip/common/network_compat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/rtemslwip/common/network_compat.c b/rtemslwip/common/network_compat.c
index c072d54..d99204c 100644
--- a/rtemslwip/common/network_compat.c
+++ b/rtemslwip/common/network_compat.c
@@ -58,6 +58,12 @@ uint16_t htons(uint16_t x)
return lwip_htons(x);
}
+#undef gethostbyname
+struct hostent *gethostbyname(const char *name)
+{
+ return lwip_gethostbyname(name);
+}
+
int
getnameinfo(const struct sockaddr *sa, socklen_t salen, char *node,
size_t nodelen, char *service, size_t servicelen, int flags)