summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw/main.c
diff options
context:
space:
mode:
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