Bug#946650: ktexteditor: FTBFS on hurd-i386: KateDocumentTest::testAutoReload fails

2019-12-12 Thread Paul Sonnenschein
Source: ktexteditor
Severity: important
Version: 5.62.0-1
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd
X-Debbugs-CC: debian-h...@lists.debian.org

Hello,

ktexteditor fails to build on hurd-i386 because of a failure of
testAutoReload in katedocument_test.

The test appears to be failing due to an insufficient wait times,
increasing the wait time resolved the issue.

Attached is a patch which increases the wait times from (200 + 800) ms
by 500 ms to (200 + 1300) ms.

Thanks!

Excerpt of build log [0]:
>   Start 46: katedocument_test
> 46/67 Test #46: katedocument_test
> ...***Failed3.21 sec
> FAIL!  : KateDocumentTest::testAutoReload() Compared values are not
> the same
>Actual   (doc.text())   : "Hello"
>Expected ("Hello\nTest"): Hello
> Test
>Loc: [/<>/autotests/src/katedocument_test.cpp(667)]
> [...]
> Totals: 20 passed, 1 failed, 0 skipped, 0 blacklisted, 3080ms
> * Finished testing of KateDocumentTest *

[0]: 
https://buildd.debian.org/status/fetch.php?pkg=ktexteditor=hurd-i386=5.62.0-1%2Bb2=1573945897=0
Subject: Fix test failure on hurd-i386: Increase wait times
Author: Paul Sonnenschein 

--- a/autotests/src/katedocument_test.cpp	2019-09-07 16:49:33.0 +0200
+++ b/autotests/src/katedocument_test.cpp	2019-12-12 20:36:20.0 +0100
@@ -663,7 +663,7 @@
 
  // Hardcoded delay m_modOnHdTimer in DocumentPrivate
 // + min val with which it looks working reliable here
-QTest::qWait(200 + 800);
+QTest::qWait(200 + 1300);
 QCOMPARE(doc.text(), "Hello\nTest");
 // ...stay in the last line after reload!
 QCOMPARE(view->cursorPosition().line(), doc.documentEnd().line());
@@ -676,7 +676,7 @@
 stream.flush();
 file.close();
 
-QTest::qWait(200 + 800);
+QTest::qWait(200 + 1300);
 QCOMPARE(doc.text(), "Hello\nTest\nWorld!");
 // ...and ensure we have not move around
 QCOMPARE(view->cursorPosition(), c);


signature.asc
Description: This is a digitally signed message part


Bug#946178: mercurial: FTBFS on hurd-i386: Testsuite failures

2019-12-04 Thread Paul Sonnenschein
Hello,

Am Mittwoch, den 04.12.2019, 23:26 +0100 schrieb Samuel Thibault:
> Paul Sonnenschein, le mer. 04 déc. 2019 21:45:14 +0100, a ecrit:
> > The test-http-bad-server.t fails due to an unexpected behaviour of
> > local sockets in the Hurd. This seems to be a bug in the Hurd
> > itself
> > (pflocal specifically), being in violation of the POSIX
> > specification
> > Issue 6 and newer.
> 
> Which violation is happening here?

According to POSIX, both read and recv shall set errno to ECONNRESET if
"[a] read was attempted on a socket and the connection was forcibly
closed by its peer." As far as I can tell, pflocal will never return
ECONNRESET.

After further study however, I do no longer believe that this is the
reason of the observed test failure, since connect already should fail.

I now have no idea why this test is failing.

Paul



signature.asc
Description: This is a digitally signed message part


Bug#946178: mercurial: FTBFS on hurd-i386: Testsuite failures

2019-12-04 Thread Paul Sonnenschein
Source: mercurial
Severity: important
Version: 5.2-1
User: debian-h...@lists.debian.org
Usertags: hurd
X-Debbugs-CC: debian-h...@lists.debian.org

Hello,

mercurial fails to build from source on hurd-i386 due to five failing
tests.

Of these tests, four fail due to unexpected error numbers.
This should be fixed in mercurial, because error numbers are not
standardized.

The test-http-bad-server.t fails due to an unexpected behaviour of
local sockets in the Hurd. This seems to be a bug in the Hurd itself
(pflocal specifically), being in violation of the POSIX specification
Issue 6 and newer.
This could be fixed by
 * Fixing the Hurd itself
 * Making the test more permissive
 * Blacklisting the test

The attached patch replaces the error number in the offending tests
with a * glob.

Thanks!


Excerpts from build log [0]:
> test-http-bad-server.t
> test-http-bad-server.t ... # Test test-http-bad-server.t 
> # Running sh "/tmp/hgtests.7iB8Fk/child58/test-http-bad-server.t.sh" 
> 
> --- /<>/tests/test-http-bad-server.t
> +++ /<>/tests/test-http-bad-server.t.err
> @@ -38,7 +38,7 @@
>$ cat hg.pid > $DAEMON_PIDS
>  
>$ hg clone http://localhost:$HGPORT/ clone
> -  abort: error: (\$ECONNRESET\$|\$EADDRNOTAVAIL\$) (re)
> +  abort: error: bad HTTP status line: No status line received - the
> server has closed the connection
>[255]
>  
>  (The server exits on its own, but there is a race between that and
> starting a new server.
> 
> ERROR: test-http-bad-server.t output changed
> !# Ret was: 0 (test-http-bad-server.t) 

> test-lfs.t
> test-lfs.t ... # Test test-lfs.t 
> # Running sh "/tmp/hgtests.7iB8Fk/child104/test-lfs.t.sh" 
> 
> --- /<>/tests/test-lfs.t
> +++ /<>/tests/test-lfs.t.err
> @@ -40,7 +40,7 @@
>> EOF
>  
>$ hg config extensions
> -  *** failed to import extension lfs from missing.py: [Errno 2]
> $ENOENT$: 'missing.py'
> +  *** failed to import extension lfs from missing.py: [Errno
> 1073741826] $ENOENT$: 'missing.py'
>abort: repository requires features unknown to this Mercurial:
> lfs!
>(see https://mercurial-scm.org/wiki/MissingRequirement for more
> information)
>[255]
> 
> ERROR: test-lfs.t output changed
> !# Ret was: 0 (test-lfs.t)

(Analogous failures exist for test-largefiles-misc.t, test-lfs-serve-
access.t and test-repair-strip.t)


[0]: 
https://buildd.debian.org/status/fetch.php?pkg=mercurial=hurd-i386=5.2-1=1573130161=0
From: Paul Sonnenschein 
Description: Fix test failures on hurd-i386 (Errno values)
Forwarded: no

diff --git a/tests/test-largefiles-misc.t b/tests/test-largefiles-misc.t
index 11b9de3a..eed33f44 100644
--- a/tests/test-largefiles-misc.t
+++ b/tests/test-largefiles-misc.t
@@ -41,7 +41,7 @@ common commands affecting largefile.
   > EOF
 
   $ hg config extensions
-  *** failed to import extension largefiles from missing.py: [Errno 2] $ENOENT$: 'missing.py'
+  \*\*\* failed to import extension largefiles from missing.py: [Errno *] $ENOENT$: 'missing.py' (glob)
   abort: repository requires features unknown to this Mercurial: largefiles!
   (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
   [255]
diff --git a/tests/test-lfs-serve-access.t b/tests/test-lfs-serve-access.t
index 940b6e78..b789462f 100644
--- a/tests/test-lfs-serve-access.t
+++ b/tests/test-lfs-serve-access.t
@@ -341,13 +341,13 @@ Test a checksum failure during the processing of the GET request
   $LOCALIP - - [$ERRDATE$] HG error:  Traceback (most recent call last): (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  verifies = store.verify(oid) (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  raise IOError(errno.EIO, r'%s: I/O error' % oid.decode("utf-8")) (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:  *Error: [Errno 5] f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e: I/O error (glob)
+  $LOCALIP - - [$ERRDATE$] HG error:  *Error: [Errno *] f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e: I/O error (glob)
   $LOCALIP - - [$ERRDATE$] HG error:   (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  Exception happened while processing request '/.git/info/lfs/objects/batch': (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  Traceback (most recent call last): (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  verifies = store.verify(oid) (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  raise IOError(errno.EIO, r'%s: I/O error' % oid.decode("utf-8")) (glob)
-  $LOCALIP - - [$ERRDATE$] HG error:  *Error: [Errno 5] b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c: I/O error (glob)
+  $LOCALIP - - [$ERRDATE$] HG error:  *Error: [Errno *] b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c: I/O error (glob)
   $LOCALIP - - [$ERRDATE$] HG error:   (glob)
   $LOCALIP - - [$ERRDATE$] HG error:  Exception happened while pr

Bug#946017: gvfs: FTBFS on hurd-i386: Used configuration depends on unavailable libraries

2019-12-02 Thread Paul Sonnenschein
Source: gvfs
Severity: important
Version: 1.42.1-3
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd
X-Debbugs-CC: debian-h...@lists.debian.org

Hello,

with the default build options, gvfs requires systemd, fuse and other
libraries to build successfully.

The applied patch disables systemd support and libraries depending on
udev on non-linux architectures and disables some additional libraries
on the hurd.

The applied patch should not affect linux-any.

Could you take a look?

Thanks.
diff --git a/debian/rules b/debian/rules
index 08b77598..05c6ec87 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,8 +7,22 @@ include /usr/share/dpkg/default.mk
 
 ifneq (,$(filter $(DEB_HOST_ARCH), hurd-i386 kfreebsd-i386 kfreebsd-amd64))
 	ADMIN_BACKEND=-Dadmin=false
+	SYSTEMD_FLAGS= \
+		-Dsystemduserunitdir=no \
+		-Dtmpfilesdir=no \
+		-Dlogind=false \
+		-Dgudev=false \
+		-Dudisks2=false \
+		-Dcdda=false \
+		-Dgphoto2=false \
+		-Dmtp=false
 else
 	ADMIN_BACKEND=
+	SYSTEMD_FLAGS=
+endif
+
+ifeq (hurd-i386, $(DEB_HOST_ARCH))
+	HURD_FLAGS = -Dafc=false -Dfuse=false -Dlibusb=false -Dsmb=false
 endif
 
 ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
@@ -23,7 +37,9 @@ override_dh_auto_configure:
 		--libexecdir=/usr/lib/gvfs \
 		-Dman=true \
 		$(ADMIN_BACKEND) \
-		$(BLURAY_BACKEND)
+		$(BLURAY_BACKEND) \
+		$(SYSTEMD_FLAGS) \
+		$(HURD_FLAGS)
 
 override_dh_auto_build:
 	dh_auto_build


signature.asc
Description: This is a digitally signed message part


Bug#945943: exim4: FTBFS on hurd-i386: "operating system GNU is not supported"

2019-12-01 Thread Paul Sonnenschein
Source: exim4
Severity: important
Version: 4.93~RC5-1
User: debian-h...@lists.debian.org
Usertags: hurd
X-Debbugs-CC: debian-h...@lists.debian.org

Hello,

exim4 fails to build from source on hurd-i386 with the message:

> *** Sorry - operating system GNU is not supported
> *** See OS/Makefile-* for supported systems

See [1] for the complete build log.

It however builds successfully if the files OS/unsupported/*-GNU are
moved into the directory OS/.

Could you take a look?

Thanks.

[1]: 
https://buildd.debian.org/status/fetch.php?pkg=exim4=hurd-i386=4.93%7ERC5-1=1574915162=0



Bug#945599: datefudge: FTBFS on hurd-i386: Necessary functions disabled

2019-11-27 Thread Paul Sonnenschein
Package: datefudge
Severity: important
Version: 1.23
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd
X-Debbugs-CC: debian-h...@lists.debian.org

Dear Maintainer,

datefudge fails to build from source on the Hurd.

The reason for the failure are the #ifndef-Blocks at the functions
time() and clock_gettime(), which are apparently no longer necessary.

The attached patch removes these #ifndef-Blocks.

Thanks.
diff --git a/datefudge.c b/datefudge.c
index fe93ef8..00cb012 100644
--- a/datefudge.c
+++ b/datefudge.c
@@ -50,8 +50,6 @@ static void set_fudge(time_t *seconds)
 *seconds -= fudge;
 }
 
-#ifndef __GNU__
-
 time_t time(time_t *x) {
 static time_t (*libc_time)(time_t *) = NULL;
 time_t res;
@@ -64,8 +62,6 @@ time_t time(time_t *x) {
 return res;
 }
 
-#endif
-
 int __gettimeofday(struct timeval *x, struct timezone *y) {
 static int (*libc_gettimeofday)(struct timeval *, struct timezone *) = NULL;
 int res;
@@ -82,8 +78,6 @@ int gettimeofday(struct timeval *x, struct timezone *y) {
 return __gettimeofday(x,y);
 }
 
-#ifndef __GNU__
-
 int clock_gettime(clockid_t x, struct timespec *y) {
 static int (*libc_clock_gettime)(clockid_t, struct timespec*);
 int res;
@@ -95,5 +89,3 @@ int clock_gettime(clockid_t x, struct timespec *y) {
 set_fudge(>tv_sec);
 return 0;
 }
-
-#endif


signature.asc
Description: This is a digitally signed message part


Bug#933015: libssh FTBFS on hurd: unconditional usage of PATH_MAX

2019-09-05 Thread Paul Sonnenschein
Hi,

Am Montag, den 29.07.2019, 18:49 +0200 schrieb Guillem Jover:
> Hi!
> 
> On Thu, 2019-07-25 at 20:36:31 +0200, Paul Sonnenschein wrote:
> > [...]
> I'd probably just unconditionally set the value and avoid PATH_MAX
> completely.

See appendix libssh-path-max-no-path-max.patch. This version does not
use PATH_MAX as a size hint.

> > [...]
> 
> JFTR, there's also the getcwd(NULL, 0) extension which is supported
> by
> GNU and BSD systems, at least. Or the explicit GNU specific function
> get_current_dir_name(), But that would need some kind of
> configuration
> check, and some fallback code anyway.

Like libssh-path-max-no-path-max.patch? The appended version does not
use CMake, but only checks for __GLIBC__, which of course could be
changed.

> > [...]
> 
> Thanks,
> Guillem

Sorry for taking so long to react, I was busy during the last few
weeks.

Thanks,
Paul Sonnenschein
Subject: Fix unconditional use of PATH_MAX
Author: Paul Sonnenschein 
Bug-Debian: https://bugs.debian.org/933015
diff --git a/tests/torture.c b/tests/torture.c
index 772942c..b4188f1 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -1030,6 +1030,12 @@ char *torture_get_current_working_dir(void)
 char *cwd = NULL;
 char *result = NULL;
 
+#ifdef __GLIBC__
+
+cwd = getcwd(NULL, 0);
+
+#else /* ! __GLIBC__ */
+
 cwd = (char *)malloc(PATH_MAX + 1);
 if (cwd == NULL) {
 goto end;
@@ -1042,6 +1048,8 @@ char *torture_get_current_working_dir(void)
 goto end;
 }
 
+#endif /* ! __GLIBC__ */
+
 end:
 return cwd;
 }
Subject: Fix unconditional use of PATH_MAX
Author: Paul Sonnenschein 
Bug-Debian: https://bugs.debian.org/933015
diff --git a/tests/torture.c b/tests/torture.c
index 772942c..08b126b 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -1029,17 +1029,21 @@ char *torture_get_current_working_dir(void)
 
 char *cwd = NULL;
 char *result = NULL;
+size_t bufsize;
 
-cwd = (char *)malloc(PATH_MAX + 1);
-if (cwd == NULL) {
-goto end;
-}
+bufsize = 4095;
+for ( ; result == NULL; bufsize *= 2) {
+cwd = (char *)realloc(cwd, bufsize + 1);
+if (cwd == NULL) {
+goto end;
+}
 
-result = getcwd(cwd, PATH_MAX);
+result = getcwd(cwd, bufsize);
 
-if (result == NULL) {
-SAFE_FREE(cwd);
-goto end;
+if (result == NULL && errno != ERANGE) {
+SAFE_FREE(cwd);
+goto end;
+}
 }
 
 end:


signature.asc
Description: This is a digitally signed message part


Bug#933336: lxqt-config: FTBFS on hurd-i386: udev not available

2019-08-03 Thread Paul Sonnenschein
Hi!

Am Montag, den 29.07.2019, 18:37 +0200 schrieb Guillem Jover:
> [...]
> 
> The usual convention is to use the same name as the queried variable,
> so «DEB_HOST_ARCH_OS = ...», but I think even better would be to just
> do «include /usr/share/dpkg/architecture.mk» and then just use the
> needed variables lazily defined there.
> 
> [...] I tend to use something like:
> 
>   confflags += -DWITH_TOUCHPAD=NO
> 
> so that it can be extended, w/o rendering the name invalid.

Updated patch according to Guillem's proposals.

> [...]

Thanks
diff --git a/debian/rules b/debian/rules
index 4f7c70d..4f5c019 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,6 +5,16 @@ export LC_ALL=C.UTF-8
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
+include /usr/share/dpkg/architecture.mk
+
+CONF_FLAGS := \
+	-DUPDATE_TRANSLATIONS=OFF \
+	-DCMAKE_BUILD_TYPE=RelWithDebInfo
+
+ifneq  ($(DEB_HOST_ARCH_OS), linux)
+CONF_FLAGS += -DWITH_TOUCHPAD=NO
+endif
+
 %:
 	dh ${@} --buildsystem cmake
 
@@ -13,8 +23,7 @@ override_dh_missing:
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
-		-DUPDATE_TRANSLATIONS=OFF \
-		-DCMAKE_BUILD_TYPE=RelWithDebInfo
+		$(CONF_FLAGS)
 
 override_dh_makeshlibs:
 	dh_makeshlibs -Xlxqt-config


Bug#933336: lxqt-config: FTBFS on hurd-i386: udev not available

2019-07-29 Thread Paul Sonnenschein
Package: lxqt-config
Severity: important
Version: 0.14.1-2
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

(Sending to debian-bsd because the patch also affects kfreebsd)

Dear maintainer,

the package lxqt-config fails to build from source on hurd-i386 because
udev is not available on non-linux (on kfreebsd-any, it is in state BD-
Uninstallable).

If the option WITH_TOUCHPAD is disabled, lxqt-config compiles.

The applied patch disables WITH_TOUCHPAD on non-linux architectures and
is based on [0].

I have not tested on kfreebsd, the patch should however be necessary
for kfreebsd too.

Thanks.

Build-Log: 
https://buildd.debian.org/status/fetch.php?pkg=lxqt-config=hurd-i386=0.14.1-2=1564267325=0
[0]: 
https://salsa.debian.org/lxqt-team/lxqt-panel/blob/debian/sid/debian/rules
diff --git a/debian/rules b/debian/rules
index 4f7c70d..81335e7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,6 +5,12 @@ export LC_ALL=C.UTF-8
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
+WHICH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
+
+ifneq  ($(WHICH_OS), linux)
+NOT_LINUX := -DWITH_TOUCHPAD=NO
+endif
+
 %:
 	dh ${@} --buildsystem cmake
 
@@ -14,7 +20,8 @@ override_dh_missing:
 override_dh_auto_configure:
 	dh_auto_configure -- \
 		-DUPDATE_TRANSLATIONS=OFF \
-		-DCMAKE_BUILD_TYPE=RelWithDebInfo
+		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
+		$(NOT_LINUX)
 
 override_dh_makeshlibs:
 	dh_makeshlibs -Xlxqt-config


Bug#933015: libssh FTBFS on hurd: unconditional usage of PATH_MAX

2019-07-25 Thread Paul Sonnenschein
Package: src:libssh
Severity: Important
Version: 0.9.0-1
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd
X-Debbugs-CC: debian-h...@lists.debian.org

Dear maintainer,

the package libssh fails to build from source on hurd-i386 in sid due
to an unconditional use of PATH_MAX, which the Hurd does not provide.

A patch which uses code similiar to the example in [1] is appended.

Thanks

[1]: 
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html
Subject: Fix unconditional use of PATH_MAX
Author: Paul Sonnenschein 
diff --git a/tests/torture.c b/tests/torture.c
index 772942c..8f9f39d 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -1029,17 +1029,25 @@ char *torture_get_current_working_dir(void)
 
 char *cwd = NULL;
 char *result = NULL;
+size_t path_max;
+
+#ifdef PATH_MAX
+path_max = PATH_MAX;
+#else
+path_max = 4095;
+#endif /* PATH_MAX undefined */
+for ( ; result == NULL; path_max *= 2) {
+cwd = (char *)realloc(cwd, path_max + 1);
+if (cwd == NULL) {
+goto end;
+}
 
-cwd = (char *)malloc(PATH_MAX + 1);
-if (cwd == NULL) {
-goto end;
-}
-
-result = getcwd(cwd, PATH_MAX);
+result = getcwd(cwd, path_max);
 
-if (result == NULL) {
-SAFE_FREE(cwd);
-goto end;
+if (result == NULL && errno != ERANGE) {
+SAFE_FREE(cwd);
+goto end;
+}
 }
 
 end:


signature.asc
Description: This is a digitally signed message part


Bug#926347: suitesparse: FTBFS on hurd-i386: mach/clock.h non-existent on GNU/Hurd

2019-04-03 Thread Paul Sonnenschein
Package: suitesparse
Severity: normal
Version: 1:5.4.0+dfsg-1
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd
X-Debbugs-CC: debian-h...@lists.debian.org

Suitesparse fails to build from source on hurd-i386 because the header
mach/clock.h is not contained in GNU Mach, however it gets included in
GraphBLAS/Demo/Include/simple_timer.h used by
GraphBLAS/Demo/Source/simple_timer.c.

For a detailed log, please see [0].

The patch consists of the following changes:

simple_timer.h
 1. Enable the Linux case (not strictly necessary, due to the existence
of an OpenMP and a C11 fallback case).
 2. Enable the Mach case only if __APPLE__ is defined

simple_timer.c
 1. Enable the Linux case on Hurd (not necessary, see simple_timer.h)
 2. Disable the Mach case unless __APPLE__ is defined (not strictly
necessary, because of the OpenMP case)

Using the Linux case is recommended in [1], however [1] does not
mention the C11 clock function.

Thanks,
Paul Sonnenschein


[0]: 
https://buildd.debian.org/status/fetch.php?pkg=suitesparse=hurd-i386=1%3A5.4.0%2Bdfsg-1=1545919779=0
[1]: https://www.gnu.org/software/hurd/hurd/porting/guidelines.html
diff --git a/GraphBLAS/Demo/Include/simple_timer.h b/GraphBLAS/Demo/Include/simple_timer.h
index 23a1c358..ef24c371 100644
--- a/GraphBLAS/Demo/Include/simple_timer.h
+++ b/GraphBLAS/Demo/Include/simple_timer.h
@@ -37,7 +37,7 @@
 #define _POSIX_C_SOURCE 200809L
 #include 
 
-#if defined ( __linux__ )
+#if defined ( __linux__ ) || defined ( __GNU__ )
 #include 
 #endif
 
@@ -45,7 +45,7 @@
 #include 
 #endif
 
-#if defined ( __MACH__ )
+#if defined ( __MACH__ ) && defined ( __APPLE__ )
 #include 
 #include 
 #endif
diff --git a/GraphBLAS/Demo/Source/simple_timer.c b/GraphBLAS/Demo/Source/simple_timer.c
index 57239d18..28fc9b9d 100644
--- a/GraphBLAS/Demo/Source/simple_timer.c
+++ b/GraphBLAS/Demo/Source/simple_timer.c
@@ -27,7 +27,7 @@ void simple_tic /* returns current time in seconds and nanoseconds */
 tic [0] = omp_get_wtime ( ) ;
 tic [1] = 0 ;
 
-#elif defined ( __linux__ )
+#elif defined ( __linux__ ) || defined ( __GNU__ )
 
 /* Linux has a very low resolution clock() function, so use the high
resolution clock_gettime instead.  May require -lrt */
@@ -36,7 +36,7 @@ void simple_tic /* returns current time in seconds and nanoseconds */
 tic [0] = (double) t.tv_sec ;
 tic [1] = (double) t.tv_nsec ;
 
-#elif defined ( __MACH__ )
+#elif defined ( __MACH__ ) && defined ( __APPLE__ )
 
 clock_serv_t cclock ;
 mach_timespec_t t ;


signature.asc
Description: This is a digitally signed message part


Bug#888640: Patch for gcab: FTBFS on hurd-i386: PATH_MAX undeclared

2018-12-17 Thread Paul Sonnenschein
The applied patch should fix the build failure of gcab by giving NULL
as the second argument to realpath and thus avoiding the need to
initialize a buffer of length PATH_MAX. Could you please take a look at
it?

The package compiles with the patch on both Linux and Hurd.

Thanks,
Paul Sonnenschein
Index: gcab-1.2/tests/gcab-self-test.c
===
--- gcab-1.2.orig/tests/gcab-self-test.c
+++ gcab-1.2/tests/gcab-self-test.c
@@ -30,13 +30,10 @@ static gchar *
 gcab_test_get_filename (const gchar *filename)
 {
 gchar *tmp;
-char full_tmp[PATH_MAX];
 g_autofree gchar *path = NULL;
 path = g_build_filename (TESTDATADIR, filename, NULL);
-tmp = realpath (path, full_tmp);
-if (tmp != NULL)
-return g_strdup (full_tmp);
-return NULL;
+tmp = realpath (path, NULL);
+return tmp;
 }
 
 static void


signature.asc
Description: This is a digitally signed message part