Properly initialize libstrongswan in _copyright.
authorTobias Brunner <tobias@strongswan.org>
Fri, 6 Aug 2010 17:28:28 +0000 (19:28 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 6 Aug 2010 17:56:42 +0000 (19:56 +0200)
This is required if libvstr is used.

src/_copyright/_copyright.c

index 9f0ad97..0729983 100644 (file)
@@ -20,7 +20,9 @@
 #include <string.h>
 #include <unistd.h>
 #include <getopt.h>
+
 #include <freeswan.h>
+#include <library.h>
 
 char usage[] = "Usage: ipsec _copyright";
 struct option opts[] = {
@@ -40,6 +42,9 @@ main(int argc, char *argv[])
        const char **notice = ipsec_copyright_notice();
        const char **co;
 
+       library_init(NULL);
+       atexit(library_deinit);
+
        while ((opt = getopt_long(argc, argv, "", opts, NULL)) != EOF)
                switch (opt) {
                case 'h':       /* help */