From 59bf91a8a50a304e19172944e3168fa6a66183cb Mon Sep 17 00:00:00 2001
From: Adriano Da Luz <al08@c3sl.ufpr.br>
Date: Tue, 15 Feb 2011 11:06:42 -0200
Subject: [PATCH] stdsoap2.{c,h}: Added defines to compile the lib for Windows

Signed-off-by: Adriano Da Luz <al08@c3sl.ufpr.br>
Acked-by: Erik Alexandre Pucci <eap08@c3sl.ufpr.br>
Signed-off-by: Danilo K. S. Yorinori <danilok@c3sl.ufpr.br>
---
 lib/stdsoap2.c | 2 ++
 lib/stdsoap2.h | 8 +++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/stdsoap2.c b/lib/stdsoap2.c
index 67835ce..3840752 100644
--- a/lib/stdsoap2.c
+++ b/lib/stdsoap2.c
@@ -3583,6 +3583,7 @@ again:
 #endif
     fd = socket(AF_INET, SOCK_STREAM, 0);
 /* Start of the injected code for the client agent */
+#ifndef WIN32
     if (soap->device)
     { struct ifreq ifr;
       struct sockaddr_in addr;
@@ -3605,6 +3606,7 @@ again:
         return SOAP_INVALID_SOCKET;
       }
     }
+#endif
 #ifndef WITH_LEAN
   }
 #endif
diff --git a/lib/stdsoap2.h b/lib/stdsoap2.h
index c19f3f6..1b73288 100644
--- a/lib/stdsoap2.h
+++ b/lib/stdsoap2.h
@@ -52,9 +52,11 @@ A commercial use license is available from Genivia, Inc., contact@genivia.com
 */
 
 /* Start of the injected code for the client agent */
-#include <sys/ioctl.h>
-#include <net/if.h>
-#include <linux/sockios.h>
+#ifndef WIN32
+# include <sys/ioctl.h>
+# include <net/if.h>
+# include <linux/sockios.h>
+#endif
 /* End of the injected code for the client agent */
 
 #ifdef WITH_SOAPDEFS_H
-- 
GitLab