projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Oops.
[tinc]
/
src
/
tincd.c
diff --git
a/src/tincd.c
b/src/tincd.c
index
b9f9f4f
..
4b30362
100644
(file)
--- a/
src/tincd.c
+++ b/
src/tincd.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: tincd.c,v 1.10.4.7
6 2003/07/22 20:55:20
guus Exp $
+ $Id: tincd.c,v 1.10.4.7
9 2003/07/30 11:50:45
guus Exp $
*/
#include "system.h"
*/
#include "system.h"
@@
-38,6
+38,8
@@
#include <lzo1x.h>
#include <lzo1x.h>
+#include <getopt.h>
+
#include "conf.h"
#include "logger.h"
#include "net.h"
#include "conf.h"
#include "logger.h"
#include "net.h"
@@
-93,6
+95,10
@@
static struct option const long_options[] = {
{NULL, 0, NULL, 0}
};
{NULL, 0, NULL, 0}
};
+#ifdef HAVE_MINGW
+static struct WSAData wsa_state;
+#endif
+
static void usage(bool status)
{
if(status)
static void usage(bool status)
{
if(status)
@@
-147,6
+153,7
@@
static void parse_options(int argc, char **argv, char **envp)
break;
case 'k': /* kill old tincds */
break;
case 'k': /* kill old tincds */
+#ifndef HAVE_MINGW
if(optarg) {
if(!strcasecmp(optarg, "HUP"))
kill_tincd = SIGHUP;
if(optarg) {
if(!strcasecmp(optarg, "HUP"))
kill_tincd = SIGHUP;
@@
-175,6
+182,7
@@
static void parse_options(int argc, char **argv, char **envp)
}
} else
kill_tincd = SIGTERM;
}
} else
kill_tincd = SIGTERM;
+#endif
break;
case 'n': /* net name given */
break;
case 'n': /* net name given */
@@
-415,6
+423,13
@@
int main(int argc, char **argv, char **envp)
exit(1);
}
exit(1);
}
+#ifdef HAVE_MINGW
+ if(WSAStartup(MAKEWORD(2, 2), &wsa_state)) {
+ logger(LOG_ERR, _("System call `%s' failed: %s"), "WSAStartup", strerror(errno));
+ exit(1);
+ }
+#endif
+
if(!detach())
exit(1);
if(!detach())
exit(1);