From 7c8b9d3a24f95837e272d42a25344405370157e5 Mon Sep 17 00:00:00 2001
From: David Sommerseth <davids@redhat.com>
Date: Wed, 25 May 2011 14:24:54 +0200
Subject: [PATCH] Fix Microsoft Visual Studio incompatibility in plugin.c
MS Visual Studio don't like to have struct members named in the
variable declaration. Without this fix, Visual Studio is not able
to compile the new v3 plug-in API.
Signed-off-by: David Sommerseth <davids@redhat.com>
Tested-by: Samuli Seppänen <samuli@openvpn.net>
---
plugin.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/plugin.c b/plugin.c
index 56bd37f..745ea51 100644
a
|
b
|
plugin_open_item (struct plugin *p, |
299 | 299 | * Call the plugin initialization |
300 | 300 | */ |
301 | 301 | if (p->open3) { |
302 | | struct openvpn_plugin_args_open_in args = { .type_mask = p->plugin_type_mask, |
303 | | .argv = o->argv, |
304 | | .envp = envp }; |
| 302 | struct openvpn_plugin_args_open_in args = { p->plugin_type_mask, |
| 303 | (const char ** const) o->argv, |
| 304 | (const char ** const) envp }; |
305 | 305 | struct openvpn_plugin_args_open_return retargs; |
306 | 306 | |
307 | 307 | CLEAR(retargs); |
… |
… |
plugin_call_item (const struct plugin *p, |
367 | 367 | * Call the plugin work function |
368 | 368 | */ |
369 | 369 | if (p->func3) { |
370 | | struct openvpn_plugin_args_func_in args = { .type = type, |
371 | | .argv = (const char **) a.argv, |
372 | | .envp = envp, |
373 | | .handle = p->plugin_handle, |
374 | | .per_client_context = per_client_context, |
375 | | .current_cert_depth = (current_cert ? certdepth : -1), |
376 | | .current_cert = current_cert }; |
| 370 | struct openvpn_plugin_args_func_in args = { type, |
| 371 | (const char ** const) a.argv, |
| 372 | (const char ** const) envp, |
| 373 | p->plugin_handle, |
| 374 | per_client_context, |
| 375 | (current_cert ? certdepth : -1), |
| 376 | current_cert }; |
377 | 377 | struct openvpn_plugin_args_func_return retargs; |
378 | 378 | |
379 | 379 | CLEAR(retargs); |