[rtmpdump] Link OpenSSL statically for Win32

David Woodhouse dwmw2 at infradead.org
Sun Apr 18 21:32:12 CEST 2010


On Sun, 2010-04-18 at 20:07 +0100, David Woodhouse wrote:
> Is the GNUTLS build expected to work on Windows? I get this...

Seems to be fixed if I do this. Winsock2 was apparently built in to
Win98 and NT4, so I suspect it's possibly OK for us to update to it now.
I mostly have no clue about Windows though.

I also need to link libgcrypt explicitly, which we arguably ought to do
anyway.

Index: librtmp/rtmp_sys.h
===================================================================
--- librtmp/rtmp_sys.h	(revision 432)
+++ librtmp/rtmp_sys.h	(working copy)
@@ -22,13 +22,13 @@
  */
 
 #ifdef WIN32
-#include <winsock.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
 #define GetSockError()	WSAGetLastError()
 #define setsockopt(a,b,c,d,e)	(setsockopt)(a,b,c,(const char *)d,(int)e)
 #define EWOULDBLOCK	WSAETIMEDOUT	/* we don't use nonblocking, but we do use timeouts */
 #define sleep(n)	Sleep(n*1000)
 #define msleep(n)	Sleep(n)
-#define socklen_t	int
 #define SET_RCVTIMEO(tv,s)	int tv = s*1000
 #else
 #include <sys/types.h>
Index: Makefile
===================================================================
--- Makefile	(revision 432)
+++ Makefile	(working copy)
@@ -5,7 +5,7 @@
 
 CRYPTO=OPENSSL
 #CRYPTO=GNUTLS
-LIB_GNUTLS=-lgnutls
+LIB_GNUTLS=-lgnutls -lgcrypt
 LIB_OPENSSL=-lssl -lcrypto
 CRYPTO_LIB=$(LIB_$(CRYPTO))
 DEF_=-DNO_CRYPTO

-- 
dwmw2



More information about the rtmpdump mailing list