]> Pileus Git - ~andy/fetchmail/commitdiff
Hacks for avoiding compiler warnings under SunOS.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 29 Apr 1997 21:28:57 +0000 (21:28 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 29 Apr 1997 21:28:57 +0000 (21:28 -0000)
svn path=/trunk/; revision=978

driver.c
fetchmail.c
socket.c

index 6d30831446b135864a20b54c43d7137e72870014..d92bc10bb16bb6bbc8bf8ef2546208cec920a9b3 100644 (file)
--- a/driver.c
+++ b/driver.c
 #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);
index 172eb17edba9f1085fc41f396fff1232e3d1f976..f94ba8eef0687c6ccfc5187fb73971be56994e8d 100644 (file)
 #include <netdb.h>
 #endif /* HAVE_GETHOSTBYNAME */
 
+#ifdef SUNOS
+#include <stdlib.h>
+#endif
+
 #include "fetchmail.h"
 #include "tunable.h"
 #include "smtp.h"
index e5b9ba5c2499120af5d362eb5924dc32b1b38a38..b8a60de0174462ee8f358cfc7a0f774798532231 100644 (file)
--- a/socket.c
+++ b/socket.c
 #endif
 #endif
 
+#ifdef SUNOS
+#include <memory.h>
+#endif
+
 FILE *SockOpen(char *host, int clientPort)
 {
     int sock;