]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Include string.h where needed
authorDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 19 Sep 2013 18:30:03 +0000 (13:30 -0500)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 19 Sep 2013 18:32:52 +0000 (13:32 -0500)
This fixes the Solaris build; reported by "Rodney".

Also clean up #includes in compat.c; there's no need for them to be
hidden within the various ifdef blocks. Leave <sys/time.h> where it was,
just in case it's problematic on some platform. The rest are already
included unconditionally in other files, so should be fine.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
compat.c
openssl.c
www/changelog.xml

index 315cfb3ddc0dcf44633160fe633173b9a114017a..acb97d6b5f0bf7b543e311361e54aff00d11b95c 100644 (file)
--- a/compat.c
+++ b/compat.c
  *   Boston, MA 02110-1301 USA
  */
 
+#include <string.h>
+#include <stdarg.h>
+#include <errno.h>
+#include <ctype.h>
+
 #include "openconnect-internal.h"
 
 #ifdef __sun__
@@ -38,8 +43,6 @@ time_t openconnect__time(time_t *t)
 #endif
 
 #ifndef HAVE_ASPRINTF
-#include <stdarg.h>
-#include <errno.h>
 
 static int oc_vasprintf(char **strp, const char *fmt, va_list ap)
 {
@@ -142,7 +145,6 @@ ssize_t openconnect__getline(char **lineptr, size_t *n, FILE *stream)
 #endif
 
 #ifndef HAVE_STRCASESTR
-#include <ctype.h>
 
 char *openconnect__strcasestr(const char *haystack, const char *needle)
 {
index 5e2a94ea7693e1881f975dc769a42108ef55ab97..a395bc53978eac5218f97bc0681e95e34c96e43c 100644 (file)
--- a/openssl.c
+++ b/openssl.c
@@ -23,6 +23,7 @@
  */
 
 #include <errno.h>
+#include <string.h>
 #include <sys/types.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
index 229e5d23bdeb7ccd5c344c45bb2e5576cefddf99..55193bee880dc8b79dbcf220a36ccf4b7c7f99f9 100644 (file)
@@ -17,6 +17,7 @@
 <ul>
    <li><b>OpenConnect HEAD</b>
      <ul>
+       <li>Fix Solaris build breakage due to missing <tt>&amp;lt;string.h&amp;gt;</tt> includes.</li>
        <li>Include path in <tt>&amp;lt;group-access&amp;gt;</tt> node.</li>
      </ul><br/>
   </li>