Package: octave-nan Version: 2.5.5-1 Severity: important Tags: patch User: debian-h...@lists.debian.org Usertags: hurd
Hi, currently[1], octave-nan does not compile on GNU/Hurd. The problem is that it tries to include <machine/endian.h> if BSD is defined (which is on Hurd, since it initially wanted to be BSD-compatible, somehow). Anyhow, the attached patch avoids that #include in Hurd, and enabling <byteswap.h> on any GNU libc platform (since GNU libc provides that header) to have optimized byte swapping macros on GNU/Hurd and also on GNU/kFreeBSD too. [1] https://buildd.debian.org/status/fetch.php?pkg=octave-nan&arch=hurd-i386&ver=2.5.5-1&stamp=1333477163 Thanks, -- Pino
--- a/src/xptopen.cpp +++ b/src/xptopen.cpp @@ -72,7 +72,7 @@ SPSS file format #define max(a,b) (((a) > (b)) ? (a) : (b)) #define min(a,b) (((a) < (b)) ? (a) : (b)) -#ifdef __linux__ +#if defined(__linux__) || defined(__GLIBC__) /* use byteswap macros from the host system, hopefully optimized ones ;-) */ #include <byteswap.h> #endif @@ -83,7 +83,7 @@ SPSS file format #define __BYTE_ORDER __LITTLE_ENDIAN #endif -#if (defined(BSD) && (BSD >= 199103)) +#if ((defined(BSD) && !defined(__GNU__)) && (BSD >= 199103)) #include <machine/endian.h> #define __BIG_ENDIAN _BIG_ENDIAN #define __LITTLE_ENDIAN _LITTLE_ENDIAN