reopen 698705
found 698705 1.9.20140401-1
tags 698705 - pending
thanks

Source: miniupnpc
Version: 1.9.20140401-1
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd

Hi,

miniupnpc-1.9.20140401-1 does not build on hurd-i386. due to that
MAXHOSTNAMELEN is not defined for GNU/Hurd. The attached patch defines
it to 64 for GNU in files miniwget.c and miniupnpc.c. Bug718519 (and
698705) was closed but not applied to the latest upstream package.

Attached is a refreshed patch together with an added conditional for
__GNU__ to not define HAS_IP_MREQN. Adding a check for
__FreeBSD_kernel__ to the line also fixes the kFreeBSD build.

Thanks!


Index: miniupnpc-1.9.20140401/miniwget.c
===================================================================
--- miniupnpc-1.9.20140401.orig/miniwget.c
+++ miniupnpc-1.9.20140401/miniwget.c
@@ -43,6 +43,9 @@
 #if defined(__sun) || defined(sun)
 #define MIN(x,y) (((x)<(y))?(x):(y))
 #endif
+#ifdef __GNU__
+#define MAXHOSTNAMELEN 64
+#endif
 
 #include "miniupnpcstrings.h"
 #include "miniwget.h"
Index: miniupnpc-1.9.20140401/miniupnpc.c
===================================================================
--- miniupnpc-1.9.20140401.orig/miniupnpc.c
+++ miniupnpc-1.9.20140401/miniupnpc.c
@@ -17,7 +17,7 @@
 #endif
 #endif
 
-#if !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(MACOSX) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun)
+#if !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(MACOSX) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun) && !defined(__GNU__) && !defined(__FreeBSD_kernel__)
 #define HAS_IP_MREQN
 #endif
 
@@ -70,6 +70,9 @@
 /* Amiga OS specific stuff */
 #define TIMEVAL struct timeval
 #endif
+#ifdef __GNU__
+#define MAXHOSTNAMELEN 64
+#endif
 
 
 #if defined(HAS_IP_MREQN) && defined(NEED_STRUCT_IP_MREQN)

Reply via email to