aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGunter Knauf <gk@gknw.de>2007-06-30 20:08:13 +0000
committerGunter Knauf <gk@gknw.de>2007-06-30 20:08:13 +0000
commitafdfa4bed24c9f937bc49807c6d547ac3a158525 (patch)
tree6ae4f7930b6bde890fd9792f68f19a914e7e14c0 /lib
parent3fc6faf1ae48f15f627ccd4fae92d9c085876d42 (diff)
minor patches to enable building for NetWare CLIB.
sent by Dmitry Mityugov.
Diffstat (limited to 'lib')
-rw-r--r--lib/connect.c7
-rw-r--r--lib/hostip.h4
-rw-r--r--lib/hostip4.c5
-rw-r--r--lib/inet_ntop.c4
-rw-r--r--lib/timeval.c3
5 files changed, 19 insertions, 4 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 0aeaf7959..8fbdd8661 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -59,10 +59,13 @@
#include <stdlib.h> /* required for free() prototype, without it, this crashes */
#endif /* on macos 68K */
-#if (defined(HAVE_FIONBIO) && defined(__NOVELL_LIBC__))
+#if (defined(HAVE_FIONBIO) && defined(NETWARE))
#include <sys/filio.h>
#endif
-#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
+#ifdef NETWARE
+#ifndef __NOVELL_LIBC__
+NETDB_DEFINE_CONTEXT
+#endif
#undef in_addr_t
#define in_addr_t unsigned long
#endif
diff --git a/lib/hostip.h b/lib/hostip.h
index e6d63ca71..199c666bd 100644
--- a/lib/hostip.h
+++ b/lib/hostip.h
@@ -26,9 +26,9 @@
#include "setup.h"
#include "hash.h"
-#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
+#ifdef NETWARE
#undef in_addr_t
-#define in_addr_t uint32_t
+#define in_addr_t unsigned long
#endif
/*
diff --git a/lib/hostip4.c b/lib/hostip4.c
index d092d2718..43b7c6961 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.c
@@ -284,7 +284,12 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
* which the gethostbyname() is the preferred() function.
*/
else {
+#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
+ NETDB_DEFINE_CONTEXT
+ h = gethostbyname((char*)hostname);
+#else
h = gethostbyname(hostname);
+#endif
if (!h)
infof(conn->data, "gethostbyname(2) failed for %s\n", hostname);
#endif /*HAVE_GETHOSTBYNAME_R */
diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c
index a05689adb..e81cb5c55 100644
--- a/lib/inet_ntop.c
+++ b/lib/inet_ntop.c
@@ -42,6 +42,10 @@
#include "inet_ntop.h"
+#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
+NETINET_DEFINE_CONTEXT
+#endif
+
#if defined(HAVE_INET_NTOA_R) && !defined(HAVE_INET_NTOA_R_DECL)
/* this platform has a inet_ntoa_r() function, but no proto declared anywhere
so we include our own proto to make compilers happy */
diff --git a/lib/timeval.c b/lib/timeval.c
index bb9c0a174..a2e9665bb 100644
--- a/lib/timeval.c
+++ b/lib/timeval.c
@@ -68,6 +68,9 @@ static int gettimeofday(struct timeval *tp, void *nothing)
}
#else /* WIN32 */
/* non-win32 version of Curl_gettimeofday() */
+#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
+#include <sys/timeval.h>
+#endif
static int gettimeofday(struct timeval *tp, void *nothing)
{
(void)nothing; /* we don't support specific time-zones */