summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw/main.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2010-03-04 16:54:56 +0000
committerluigi <luigi@FreeBSD.org>2010-03-04 16:54:56 +0000
commit9b5097a55ee3c152b4776bb49d9f1472c3a56d4c (patch)
treeff6a6ed9ea1795d851aea5bebe76194aa4d0faab /sbin/ipfw/main.c
parent70c24f778e7acb9d4246a9d4c5e1f0dc74a66b8a (diff)
downloadFreeBSD-src-9b5097a55ee3c152b4776bb49d9f1472c3a56d4c.zip
FreeBSD-src-9b5097a55ee3c152b4776bb49d9f1472c3a56d4c.tar.gz
reduce diffs with the cross-platform version (windows needs
some extra initialization)
Diffstat (limited to 'sbin/ipfw/main.c')
-rw-r--r--sbin/ipfw/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sbin/ipfw/main.c b/sbin/ipfw/main.c
index 3f48178..cd39cf1 100644
--- a/sbin/ipfw/main.c
+++ b/sbin/ipfw/main.c
@@ -583,6 +583,20 @@ ipfw_readfile(int ac, char *av[])
int
main(int ac, char *av[])
{
+#if defined(_WIN32) && defined(TCC)
+ {
+ WSADATA wsaData;
+ int ret=0;
+ unsigned short wVersionRequested = MAKEWORD(2, 2);
+ ret = WSAStartup(wVersionRequested, &wsaData);
+ if (ret != 0) {
+ /* Tell the user that we could not find a usable */
+ /* Winsock DLL. */
+ printf("WSAStartup failed with error: %d\n", ret);
+ return 1;
+ }
+ }
+#endif
/*
* If the last argument is an absolute pathname, interpret it
* as a file to be preprocessed.
OpenPOWER on IntegriCloud