Source: nuttcp
Version: 6.1.2-4
Severity: normal
Tags: patch
Usertags: hurd
User: [email protected]

Hello,

currently nuttcp FTBFS on GNU/Hurd due to a confusion with the cpp
definitions of __MACH__ for Hurd and Mac OSX. The attached patch fixes
the problem to only include Mac OS specific headers for that OS, and
not for Hurd.

Thanks!
Index: nuttcp-6.1.2/nuttcp-6.1.2.c
===================================================================
--- nuttcp-6.1.2.orig/nuttcp-6.1.2.c
+++ nuttcp-6.1.2/nuttcp-6.1.2.c
@@ -415,7 +415,7 @@ static char RCSid[] = "@(#)$Revision: 1.
 /* #if defined(linux) || defined(__FreeBSD__) || defined (sgi) || (defined(__MACH__) && defined(_SOCKLEN_T)) || defined(sparc) || defined(__CYGWIN__) */
 /* to the following (hopefully equivalent) simpler form like we use
  * for HAVE_POLL */
-#if !defined(_WIN32) && (!defined(__MACH__) || defined(_SOCKLEN_T))
+#if !defined(_WIN32) && (!(defined(__APPLE__) && defined(__MACH__)) || defined(_SOCKLEN_T))
 #include <unistd.h>
 #include <sys/wait.h>
 #include <strings.h>
@@ -431,7 +431,7 @@ static char RCSid[] = "@(#)$Revision: 1.
 #define HAVE_SETPRIO
 #endif
 
-#if !defined(_WIN32) && (!defined(__MACH__) || defined(_SOCKLEN_T))
+#if !defined(_WIN32) && (!(defined(__APPLE__) && defined(__MACH__)) || defined(_SOCKLEN_T))
 #define HAVE_POLL
 #endif
 

Reply via email to