miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[patch] Support for Cygwin

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> libnatpmp Compilation/Installation
View previous topic :: View next topic  
Author Message
rb07



Joined: 31 May 2009
Posts: 8

PostPosted: Sun May 31, 2009 1:21 am    Post subject: [patch] Support for Cygwin Reply with quote

I built Transmission (1.61) which includes libnatpmp-20090310, the following patch was necessary:
Code:
diff -Nau getgateway.c.orig getgateway.c
--- getgateway.c.orig   2009-05-14 20:32:39.796875000 -0500
+++ getgateway.c        2009-05-15 14:13:01.906250000 -0500
@@ -56,6 +56,17 @@
 #define USE_WIN32_CODE
 #endif
 
+#ifdef __CYGWIN__
+#undef USE_PROC_NET_ROUTE
+#undef USE_SOCKET_ROUTE
+#undef USE_SYSCTL_NET_ROUTE
+#define USE_WIN32_CODE
+#include <stdarg.h>
+#include <w32api/windef.h>
+#include <w32api/winbase.h>
+#include <w32api/winreg.h>
+#endif
+
 #ifdef USE_SYSCTL_NET_ROUTE
 #include <stdlib.h>
 #include <sys/sysctl.h>



The original Makefile is not used, so I won't submit a patch, but taking a quick glance I can say it needs patching also (lib*.so is *.dll) but since there seems to be MinGW stuff all over then its probably taken care of.
_________________
R.B.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> libnatpmp Compilation/Installation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.