Source: htslib
Version: 1.3.1-2
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd
HI,
htslib currently FTBFS on GNU/Hurd due to a missing PATH_MAX definition. In the
package a patch for PATH_MAX (define_PATH_MAX.patch) was supplied in cram/os.h.
Unfortunately it was placed inside the big #if !defined(SP_BIG_ENDIAN) &&
!defined(SP_LITTLE_ENDIAN) #endif thereby not being effective. The updated patch
fixes this problem as well as removing the redundant definition of PATH_MAX in
cram/open_trace_file.c.
Thanks!
Index: htslib-1.3.1/cram/os.h
===================================================================
--- htslib-1.3.1.orig/cram/os.h
+++ htslib-1.3.1/cram/os.h
@@ -153,6 +153,13 @@ extern "C" {
#endif
+/*
+ * in case PATH_MAX is not defined (like in hurd)
+ */
+#ifndef PATH_MAX
+# define PATH_MAX 1024
+#endif
+
/*-----------------------------------------------------------------------------
* Allow for unaligned memory access. This is used in BAM code as the packed
* structure has 4-byte cigar ints after the variable length name.
Index: htslib-1.3.1/cram/open_trace_file.c
===================================================================
--- htslib-1.3.1.orig/cram/open_trace_file.c
+++ htslib-1.3.1/cram/open_trace_file.c
@@ -72,9 +72,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
#include <sys/types.h>
#include <sys/stat.h>
#include "cram/os.h"
-#ifndef PATH_MAX
-# define PATH_MAX 1024
-#endif
#include "cram/open_trace_file.h"
#include "cram/misc.h"