Package: qdbm Version: 1.8.78-1 Severity: important Tags: patch User: debian-h...@lists.debian.org Usertags: hurd
Hi, currently[1], qdbm fails to build on GNU/Hurd. The problem is due to the fact that the msync() POSIX function is not implemented on Hurd yet, thus returns -1 and sets ENOSYS as errno. On the other hand, even without it qdbm seems to work fine on Hurd, and the various tests succeed with the attached patch (which ignores msync() failures when errno is ENOSYS). I'm not sure whether the patch could be suitable for upstream though, although it can work for the Debian packaging (and it won't need any change when msync() is implemented). [1] https://buildd.debian.org/status/fetch.php?pkg=qdbm&arch=hurd-i386&ver=1.8.78-1&stamp=1321148107 Thanks, -- Pino
--- a/depot.c +++ b/depot.c @@ -19,6 +19,8 @@ #include "depot.h" #include "myconf.h" +#include <errno.h> + #define DP_FILEMODE 00644 /* permission of a creating file */ #define DP_MAGICNUMB "[DEPOT]\n\f" /* magic number on environments of big endian */ #define DP_MAGICNUML "[depot]\n\f" /* magic number on environments of little endian */ @@ -761,7 +763,7 @@ } *((int *)(depot->map + DP_FSIZOFF)) = depot->fsiz; *((int *)(depot->map + DP_RNUMOFF)) = depot->rnum; - if(msync(depot->map, depot->msiz, MS_SYNC) == -1){ + if(msync(depot->map, depot->msiz, MS_SYNC) == -1 && errno != ENOSYS){ dpecodeset(DP_EMAP, __FILE__, __LINE__); depot->fatal = TRUE; return FALSE; @@ -1473,7 +1475,7 @@ } *((int *)(depot->map + DP_FSIZOFF)) = depot->fsiz; *((int *)(depot->map + DP_RNUMOFF)) = depot->rnum; - if(msync(depot->map, depot->msiz, MS_SYNC) == -1){ + if(msync(depot->map, depot->msiz, MS_SYNC) == -1 && errno != ENOSYS){ dpecodeset(DP_EMAP, __FILE__, __LINE__); depot->fatal = TRUE; return FALSE;