summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2011-11-03 21:06:55 +0000
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-11-03 21:06:55 +0000
commita338b57552d7aedc29addb976b2632476be9a976 (patch)
tree98b86bef4f071afe43f267827f6ee62b96ca74b5 /main.c
parentedf1c8779fe2e458c8cc68f49b120dbdf37dea3c (diff)
downloadopenconnect-a338b57552d7aedc29addb976b2632476be9a976.tar.gz
openconnect-a338b57552d7aedc29addb976b2632476be9a976.tar.bz2
openconnect-a338b57552d7aedc29addb976b2632476be9a976.zip
Fix build with -ansi and without optimisation.
strdup(), strcasecmp(), vsyslog(), and other things need feature macros defined. For some reason this only bites when optimisation is disabled. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.c b/main.c
index faea09a..56a745a 100644
--- a/main.c
+++ b/main.c
@@ -23,6 +23,8 @@
* Boston, MA 02110-1301 USA
*/
+#define _BSD_SOURCE
+#define _POSIX_SOURCE
#include <stdio.h>
#ifdef ANDROID
#include <android/log.h>
@@ -33,6 +35,9 @@
#include <stdlib.h>
#include <signal.h>
#include <string.h>
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>