Browse code

Declare Windows version of openvpn_execve() before use

commit bf97c00f7dba441b504881f38e40afcbb610a39f moved
the generic openvpn_execve() to run_command.c and made it static.
But the Windows version is still in win32.c and is called from
run_command.c

Fix by declaring the function in win32.h

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1540436716-5725-1-git-send-email-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17825.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>

Selva Nair authored on 2018/10/25 12:05:16
Showing 1 changed files
... ...
@@ -27,6 +27,7 @@
27 27
 
28 28
 #include "mtu.h"
29 29
 #include "openvpn-msg.h"
30
+#include "argv.h"
30 31
 
31 32
 /* location of executables */
32 33
 #define SYS_PATH_ENV_VAR_NAME "SystemRoot"  /* environmental variable name that normally contains the system path */
... ...
@@ -316,5 +317,11 @@ const char *win32_version_string(struct gc_arena *gc, bool add_name);
316 316
 bool send_msg_iservice(HANDLE pipe, const void *data, size_t size,
317 317
                        ack_message_t *ack, const char *context);
318 318
 
319
+/*
320
+ * Attempt to simulate fork/execve on Windows
321
+ */
322
+int
323
+openvpn_execve(const struct argv *a, const struct env_set *es, const unsigned int flags);
324
+
319 325
 #endif /* ifndef OPENVPN_WIN32_H */
320 326
 #endif /* ifdef _WIN32 */