Properly initialize libstrongswan in _copyright.
This is required if libvstr is used.
This commit is contained in:
@@ -20,7 +20,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
|
||||||
#include <freeswan.h>
|
#include <freeswan.h>
|
||||||
|
#include <library.h>
|
||||||
|
|
||||||
char usage[] = "Usage: ipsec _copyright";
|
char usage[] = "Usage: ipsec _copyright";
|
||||||
struct option opts[] = {
|
struct option opts[] = {
|
||||||
@@ -40,6 +42,9 @@ main(int argc, char *argv[])
|
|||||||
const char **notice = ipsec_copyright_notice();
|
const char **notice = ipsec_copyright_notice();
|
||||||
const char **co;
|
const char **co;
|
||||||
|
|
||||||
|
library_init(NULL);
|
||||||
|
atexit(library_deinit);
|
||||||
|
|
||||||
while ((opt = getopt_long(argc, argv, "", opts, NULL)) != EOF)
|
while ((opt = getopt_long(argc, argv, "", opts, NULL)) != EOF)
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'h': /* help */
|
case 'h': /* help */
|
||||||
|
|||||||
Reference in New Issue
Block a user