projects
/
NeonServV5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
358961c
)
fixed WIN32 compatibility
author
pk910
<philipp@zoelle1.de>
Sun, 11 Dec 2011 06:26:18 +0000
(07:26 +0100)
committer
pk910
<philipp@zoelle1.de>
Sun, 11 Dec 2011 06:27:19 +0000
(07:27 +0100)
src/main.c
patch
|
blob
|
history
src/main.h
patch
|
blob
|
history
diff --git
a/src/main.c
b/src/main.c
index 189cfd3f597a94fb9ebace10885559b624836e80..e81d8109fad980f96f970f861eccaf807cc412d8 100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-153,7
+153,11
@@
main:
memcpy(restart_argv, argv, argc * sizeof(char *));
restart_argv[argc] = NULL;
+ #ifdef WIN32
+ execv(argv[0], (const char * const*)restart_argv);
+ #else
execv(argv[0], restart_argv);
+ #endif
}
goto main;
}
diff --git
a/src/main.h
b/src/main.h
index 51986150719b5914edb794ed0d7c5850c234f026..3ffae355d1dcf5ec10b28c35d1cfde458eea0cc7 100644
(file)
--- a/
src/main.h
+++ b/
src/main.h
@@
-32,6
+32,7
@@
#ifdef WIN32
#include <windows.h>
#include <winsock2.h>
+#include <malloc.h>
#else
#include <sys/types.h>
#include <sys/socket.h>