[sane-devel] [PATCH 2/2] fix sanei_udp, socklen_t was not defined on win32
Ruediger Meier
sweet_f_a at gmx.de
Wed Jan 25 00:59:34 UTC 2012
From: Ruediger Meier <ruediger.meier at ga-group.nl>
Signed-off-by: Ruediger Meier <ruediger.meier at ga-group.nl>
---
sanei/sanei_udp.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/sanei/sanei_udp.c b/sanei/sanei_udp.c
index ab316ea..baf4ee9 100644
--- a/sanei/sanei_udp.c
+++ b/sanei/sanei_udp.c
@@ -50,6 +50,9 @@
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#include <netinet/in.h>
@@ -63,6 +66,10 @@
#include "../include/sane/sanei_debug.h"
#include "../include/sane/sanei_udp.h"
+#ifdef HAVE_SOCKLEN_T
+typedef int socklen_t;
+#endif
+
static SANE_Status
sanei_udp_socket(int *fdp, int broadcast)
{
--
1.7.6.1
More information about the sane-devel
mailing list