diff options
Diffstat (limited to 'src/stroke')
-rw-r--r-- | src/stroke/Makefile.am | 5 | ||||
-rw-r--r-- | src/stroke/stroke.c | 6 |
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 */ |