summaryrefslogtreecommitdiff
path: root/nuttx/lib/lib_inetntoa.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/lib/lib_inetntoa.c')
-rw-r--r--nuttx/lib/lib_inetntoa.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/nuttx/lib/lib_inetntoa.c b/nuttx/lib/lib_inetntoa.c
index 4aea7826a..c94f25a52 100644
--- a/nuttx/lib/lib_inetntoa.c
+++ b/nuttx/lib/lib_inetntoa.c
@@ -56,10 +56,21 @@
*
****************************************************************************/
-char *inet_ntoa(struct in_addr in)
+#ifdef CONFIG_CAN_PASS_STRUCTS
+FAR char *inet_ntoa(struct in_addr in)
{
static char buffer[18];
char *ptr = (char*)&in.s_addr;
sprintf(buffer, "%d.%d.%d.%d", ptr[0], ptr[1], ptr[2], ptr[3]);
return buffer;
}
+#else
+FAR char *_inet_ntoa(in_addr_t in)
+{
+ static char buffer[18];
+ FAR char *ptr = (FAR char*)∈
+ sprintf(buffer, "%d.%d.%d.%d", ptr[0], ptr[1], ptr[2], ptr[3]);
+ return buffer;
+}
+#endif
+