]> granicus.if.org Git - curl/commitdiff
Eric's #include fixes for better macos compiles
authorDaniel Stenberg <daniel@haxx.se>
Tue, 4 Dec 2001 13:03:08 +0000 (13:03 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 4 Dec 2001 13:03:08 +0000 (13:03 +0000)
lib/connect.c
lib/getpass.c
lib/hostip.c
lib/sendf.c

index c045ba436b93c05c5aa86dd88ad4ce543b0aba2f..69308df2b26b51abbbc66858673fefdf41347540 100644 (file)
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h> /* required for free() prototype, without it, this crashes
+                       on macos 68K */
+#endif
 
 #endif
 #include <stdio.h>
index 76af6fac9a59b124f8b5e5324ff89338327c3956..62f93ffa0427bd6dac575d675a992c3e5d777641 100644 (file)
@@ -35,9 +35,7 @@
  *   Daniel Stenberg <daniel@haxx.se>
  */
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
+#include "setup.h" /* setup.h is required for read() prototype */
 
 #ifndef HAVE_GETPASS_R
 
index b77f704217d7f0b81eef155c52eec8ca755ede70..f3a3ccaa5d09446e188165e9ce920b47bcd98d0c 100644 (file)
@@ -28,7 +28,6 @@
 
 #define _REENTRANT
 
-
 #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
 #include <winsock.h>
 #else
@@ -47,6 +46,9 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>    /* required for free() prototypes */
+#endif
 #ifdef VMS
 #include <inet.h>
 #include <stdlib.h>
index fd58220d9d40855fc762e6eb281c5437daff49a8..2a0aa78c3f57eb32aa5ddcbbe858f1921289b3a4 100644 (file)
 #include <stdarg.h>
 #include <stdlib.h>
 
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>        /* required for send() & recv() prototypes */
+#endif
+
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif