Be more self-sufficient with header inclusions
authorDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 29 May 2012 14:11:11 +0000 (15:11 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 29 May 2012 14:11:11 +0000 (15:11 +0100)
Don't rely on things that are implicitly included through OpenSSL headers.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
cstp.c
library.c
ssl.c
tun.c

diff --git a/cstp.c b/cstp.c
index 23fae8f..e68bd4b 100644 (file)
--- a/cstp.c
+++ b/cstp.c
@@ -29,6 +29,9 @@
 #include <time.h>
 #include <string.h>
 #include <ctype.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <stdio.h>
 
 #include <openssl/ssl.h>
 #include <openssl/err.h>
index 03bccd4..52a8a59 100644 (file)
--- a/library.c
+++ b/library.c
@@ -24,6 +24,7 @@
 
 #include <string.h>
 #include <errno.h>
+#include <stdlib.h>
 
 #include "openconnect-internal.h"
 
diff --git a/ssl.c b/ssl.c
index 3e0339b..9fe2c33 100644 (file)
--- a/ssl.c
+++ b/ssl.c
@@ -32,6 +32,7 @@
 #include <stdio.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include <errno.h>
 #if defined(__linux__)
 #include <sys/vfs.h>
 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__APPLE__)
diff --git a/tun.c b/tun.c
index abfb323..09cf635 100644 (file)
--- a/tun.c
+++ b/tun.c
@@ -38,6 +38,8 @@
 #include <arpa/inet.h>
 #include <errno.h>
 #include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
 #if defined(__sun__)
 #include <stropts.h>
 #include <sys/sockio.h>