File: hurd.patch

package info (click to toggle)
libfile-map-perl 0.71-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 784 kB
  • sloc: perl: 365; ansic: 97; makefile: 3
file content (28 lines) | stat: -rw-r--r-- 819 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Fix test failures on hurd-i386.
 Make madvise() no-op, not implemented on Hurd.
 Skip threads tests, thread implementation problematic.
Author: Bas Couwenberg <sebastic@debian.org>
Forwarded: https://github.com/Leont/file-map/pull/6

--- a/lib/File/mmap-compat.c
+++ b/lib/File/mmap-compat.c
@@ -84,7 +84,7 @@ static size_t page_size() {
 	return pagesize;
 }
 
-#ifdef VMS
+#if defined(VMS) || defined(__GNU__)
 #  define madvise(address, length, advice) 0
 #elif defined(__CYGWIN__) || defined(__QNX__)
 #	define madvise posix_madvise
--- a/t/20-threads.t
+++ b/t/20-threads.t
@@ -5,7 +5,7 @@ use warnings;
 use Config;
 BEGIN {
 	# Yes, this is really necessary
-	if ($Config{useithreads}) {
+	if ($Config{useithreads} && $^O ne 'gnu') {
 		require threads;
 		threads->import();
 		require Test::More;