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-10-25 22:04:54 +0200
commit7fb4c9e101f8477217ce9d818835bab5cc30f484 (patch)
treeb67b07aec1771eec2a602c82ddd53c62e2d6c5e9 /utils/utils.c
parenta618be2a69a347128a4e29c879abf4a913421f52 (diff)
downloadnetsurf-7fb4c9e101f8477217ce9d818835bab5cc30f484.tar.gz
netsurf-7fb4c9e101f8477217ce9d818835bab5cc30f484.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