aboutsummaryrefslogtreecommitdiffstats
path: root/src/stroke
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2009-04-30 11:37:54 +0000
committerTobias Brunner <tobias@strongswan.org>2009-04-30 11:37:54 +0000
commitd24a74c5b4fb62b720a79b632021746b69de7c45 (patch)
treefd8854673b9d72059d7f9459a82663d5a70617ce /src/stroke
parent466f11bfaf56c389947b2cbee6dd4f1fb56a821e (diff)
downloadstrongswan-d24a74c5b4fb62b720a79b632021746b69de7c45.tar.bz2
strongswan-d24a74c5b4fb62b720a79b632021746b69de7c45.tar.xz
merging changes from portability branch back to trunk
important change for developers: %Y replaces %D to print identities!
Diffstat (limited to 'src/stroke')
-rw-r--r--src/stroke/Makefile.am5
-rw-r--r--src/stroke/stroke.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/stroke/Makefile.am b/src/stroke/Makefile.am
index df20252e2..22f317f8f 100644
--- a/src/stroke/Makefile.am
+++ b/src/stroke/Makefile.am
@@ -3,8 +3,9 @@ ipsec_PROGRAMS = stroke
stroke_SOURCES = stroke.c stroke_msg.h stroke_keywords.c stroke_keywords.h
INCLUDES = -I$(top_srcdir)/src/libstrongswan
EXTRA_DIST = stroke_keywords.txt
+BUILT_SOURCES = stroke_keywords.c
MAINTAINERCLEANFILES = stroke_keywords.c
AM_CFLAGS = -DIPSEC_PIDDIR=\"${piddir}\"
-stroke_keywords.c: stroke_keywords.txt stroke_keywords.h
- $(GPERF) -C -G -t < $< > $@
+stroke_keywords.c: $(srcdir)/stroke_keywords.txt $(srcdir)/stroke_keywords.h
+ $(GPERF) -D -C -G -t < $(srcdir)/stroke_keywords.txt > $@
diff --git a/src/stroke/stroke.c b/src/stroke/stroke.c
index 66028900d..a8b705697 100644
--- a/src/stroke/stroke.c
+++ b/src/stroke/stroke.c
@@ -27,6 +27,7 @@
#include <errno.h>
#include <stdio.h>
#include <stddef.h>
+#include <string.h>
#include "stroke_msg.h"
#include "stroke_keywords.h"
@@ -54,10 +55,13 @@ static char* push_string(stroke_msg_t *msg, char *string)
static int send_stroke_msg (stroke_msg_t *msg)
{
- struct sockaddr_un ctl_addr = { AF_UNIX, STROKE_SOCKET };
+ struct sockaddr_un ctl_addr;
int sock;
char buffer[64];
int byte_count;
+
+ ctl_addr.sun_family = AF_UNIX;
+ strcpy(ctl_addr.sun_path, STROKE_SOCKET);
msg->output_verbosity = 1; /* CONTROL */