libosip2-4.0.0 と libeXosip2-4.0.0 を使用することにしました
やった;
1. pthreads-w32-2-9-1-release.tar.gz をインストールします
$ きれいな GC を作る
- c:\develop\pthreads-w32 にコピーします
2. MinGW32 を使用して MSYS で libosip2-4.0.0 をコンパイルします。
$ ./configure LDFLAGS="-L/c/develop/pthreads-w32" CPPFLAGS="-I/c/develop/pthreads-w32" LIBS="-lpthreadGC2"
- include/osip2/internal.h を変更: 先頭に「#define HAVE_PTHREAD_WIN32」を追加
- src/osip2/osip_time.c を変更: このように..
#elif !defined(__PALMOS__) && defined(WIN32)
....
static int _osip_gettimeofday_realtime (struct timeval *tp, void *tz)
{
gettimeofday(tp, tz) を返します。
}
$ make && make install
3. MinGW32 を使用して MSYS で libeXosip2-4.0.0 をコンパイルします。
$ ./configure LDFLAGS="-L/c/develop/pthreads-w32" CPPFLAGS="-I/c/develop/pthreads-w32" LIBS="-lpthreadGC2"
- src/eXtl_tcp.c を変更: http://www.utterspeech.com/article/random-fixes/1 を参照
#ifdef WIN32
-#include <Mstcpip.h>
+/* MinGW の修正: Mstcpip.h の置き換え */
+
+struct tcp_keepalive {
+ ULONG onoff;
+ ULONGキープアライブタイム;
+ ULONG キープアライブ間隔;
+};
+
+#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)
+
#endif
- src/eXtl_tcp.c を変更: http://www.utterspeech.com/article/random-fixes/1 を参照
#ifdef WIN32
-#include <Mstcpip.h>
+/* MinGW 修正: #include <Mstcpip.h>*/
#include <wincrypt.h>
#endif
$ make && make install