Index: rtmpsuck.c =================================================================== --- rtmpsuck.c (revision 145) +++ rtmpsuck.c (working copy) @@ -38,6 +38,15 @@ #ifdef WIN32 #include +#include +#include +#define close(x) closesocket(x) +#define setsockopt(a,b,c,d,e) (setsockopt)(a,b,c,(const char *)d,(int)e) +#define EWOULDBLOCK EAGAIN +#define sleep(n) Sleep(n*1000) +#define usleep(n) Sleep(n) +typedef int socklen_t; +#define SIGPIPE 13 /* broken pipe */ #else #ifdef linux #include Index: rtmpsrv.c =================================================================== --- rtmpsrv.c (revision 145) +++ rtmpsrv.c (working copy) @@ -37,7 +37,16 @@ #include "parseurl.h" #ifdef WIN32 +#include #include +#include +#define close(x) closesocket(x) +#define setsockopt(a,b,c,d,e) (setsockopt)(a,b,c,(const char *)d,(int)e) +#define EWOULDBLOCK EAGAIN +#define sleep(n) Sleep(n*1000) +#define usleep(n) Sleep(n) +typedef int socklen_t; +#define SIGPIPE 13 /* broken pipe */ #else #ifdef linux #include Index: streams.c =================================================================== --- streams.c (revision 145) +++ streams.c (working copy) @@ -33,6 +33,15 @@ #ifdef WIN32 #include +#include +#include +#define close(x) closesocket(x) +#define setsockopt(a,b,c,d,e) (setsockopt)(a,b,c,(const char *)d,(int)e) +#define EWOULDBLOCK EAGAIN +#define sleep(n) Sleep(n*1000) +#define usleep(n) Sleep(n) +typedef int socklen_t; +#define SIGPIPE 13 /* broken pipe */ #else #include #endif Index: rtmp.c =================================================================== --- rtmp.c (revision 145) +++ rtmp.c (working copy) @@ -28,6 +28,7 @@ #include #ifdef WIN32 +#include #include #define close(x) closesocket(x) #define setsockopt(a,b,c,d,e) (setsockopt)(a,b,c,(const char *)d,(int)e) Index: Makefile =================================================================== --- Makefile (revision 145) +++ Makefile (working copy) @@ -13,11 +13,12 @@ all: @echo 'use "make linux" for a native Linux build, or' @echo ' "make osx" for a native OSX build, or' - @echo ' "make mingw" for a MinGW32 build, or' + @echo ' "make mingw" for a cross-compiled MinGW32 build, or' + @echo ' "make mingw1" for a MinGW (on windows) build, or' @echo ' "make cygwin" for a CygWin build, or' @echo ' "make arm" for a cross-compiled Linux ARM build' -progs: rtmpdump streams +progs: rtmpdump streams rtmpsrv rtmpsuck linux: @$(MAKE) $(MAKEFLAGS) progs @@ -31,6 +32,9 @@ cygwin: @$(MAKE) XCFLAGS=-static XLDFLAGS="-static-libgcc -static" EXT=.exe $(MAKEFLAGS) progs +mingw1: + @$(MAKE) LIBS="-lwsock32 -lws2_32 -lwinmm -lgdi32 -mwindows $(LIBS)" THREADLIB= EXT=.exe $(MAKEFLAGS) progs + arm: @$(MAKE) CROSS_COMPILE=armv7a-angstrom-linux-gnueabi- INC=-I/OE/tmp/staging/armv7a-angstrom-linux-gnueabi/usr/include $(MAKEFLAGS) progs