summaryrefslogtreecommitdiff
path: root/utils/utils.c
diff options
context:
space:
mode:
authorAshish Gupta <ashmew2@gmail.com>2017-04-13 23:36:26 +0200
committerAshish Gupta <ashmew2@gmail.com>2017-06-10 08:25:29 +0200
commit6fed24e8948c1acaaeae002b9ee7ee44a7e2e0a5 (patch)
tree313901d40813d40f94fc5898f782ff55c82df26d /utils/utils.c
parent6fd280bb5b27842a0ef2977798566c37bd4e1d0e (diff)
downloadnetsurf-6fed24e8948c1acaaeae002b9ee7ee44a7e2e0a5.tar.gz
netsurf-6fed24e8948c1acaaeae002b9ee7ee44a7e2e0a5.tar.bz2
Step 2 : Abuse _TARGET_IS_KOLIBRIOS and build with make TARGET=kolibrios
Diffstat (limited to 'utils/utils.c')
-rw-r--r--utils/utils.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/utils/utils.c b/utils/utils.c
index 15c91c621..e464a4382 100644
--- a/utils/utils.c
+++ b/utils/utils.c
@@ -25,6 +25,9 @@
#include <string.h>
#include <strings.h>
#include <sys/stat.h>
+#ifdef _TARGET_IS_KOLIBRIOS
+#include <errno.h>
+#endif
#include "utils/messages.h"
#include "utils/dirent.h"
@@ -418,6 +421,7 @@ char *realpath(const char *path, char *resolved_path)
}
return ret;
}
+#endif
#ifndef HAVE_INETATON
@@ -448,10 +452,15 @@ int inet_aton(const char *cp, struct in_addr *inp)
int inet_pton(int af, const char *src, void *dst)
{
int ret;
-
+#ifndef _TARGET_IS_KOLIBRIOS
if (af == AF_INET) {
ret = inet_aton(src, dst);
}
+#else
+ if (1) {
+ ret = inet_aton(src, dst);
+ }
+#endif
#if !defined(NO_IPV6)
else if (af == AF_INET6) {
/* TODO: implement v6 address support */
@@ -468,6 +477,3 @@ int inet_pton(int af, const char *src, void *dst)
}
#endif
-
-
-#endif