aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-04-29 21:28:57 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-04-29 21:28:57 +0000
commit215a3549f46eeef56bb81cf9b75fc133ab610219 (patch)
tree84507fe1a6aa0fcfdb1ddf25198d32046505c83d
parent96f6a69101a3b29e0086b8b19b17a462bd889914 (diff)
downloadfetchmail-215a3549f46eeef56bb81cf9b75fc133ab610219.tar.gz
fetchmail-215a3549f46eeef56bb81cf9b75fc133ab610219.tar.bz2
fetchmail-215a3549f46eeef56bb81cf9b75fc133ab610219.zip
Hacks for avoiding compiler warnings under SunOS.
svn path=/trunk/; revision=978
-rw-r--r--driver.c8
-rw-r--r--fetchmail.c4
-rw-r--r--socket.c4
3 files changed, 14 insertions, 2 deletions
diff --git a/driver.c b/driver.c
index 6d308314..d92bc10b 100644
--- a/driver.c
+++ b/driver.c
@@ -37,6 +37,10 @@
#include "mx.h"
#endif /* HAVE_GETHOSTBYNAME */
+#ifdef SUNOS
+#include <memory.h>
+#endif
+
#ifdef KERBEROS_V4
#include <krb.h>
#include <des.h>
@@ -481,7 +485,7 @@ char *realname; /* real name of host */
set_timeout(ctl->server.timeout);
/* leave extra room for reply_hack to play with */
- line = realloc(line, strlen(line) + strlen(buf) + HOSTLEN + 1);
+ line = (char *) realloc(line, strlen(line) + strlen(buf) + HOSTLEN + 1);
strcat(line, buf);
if (line[0] == '\r' && line[1] == '\n')
break;
@@ -548,7 +552,7 @@ char *realname; /* real name of host */
int newlen;
newlen = oldlen + strlen(line);
- headers = realloc(headers, newlen + 1);
+ headers = (char *) realloc(headers, newlen + 1);
if (headers == NULL)
return(PS_IOERR);
strcpy(headers + oldlen, line);
diff --git a/fetchmail.c b/fetchmail.c
index 172eb17e..f94ba8ee 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -33,6 +33,10 @@
#include <netdb.h>
#endif /* HAVE_GETHOSTBYNAME */
+#ifdef SUNOS
+#include <stdlib.h>
+#endif
+
#include "fetchmail.h"
#include "tunable.h"
#include "smtp.h"
diff --git a/socket.c b/socket.c
index e5b9ba5c..b8a60de0 100644
--- a/socket.c
+++ b/socket.c
@@ -34,6 +34,10 @@
#endif
#endif
+#ifdef SUNOS
+#include <memory.h>
+#endif
+
FILE *SockOpen(char *host, int clientPort)
{
int sock;