summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-10-14 18:16:21 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-10-14 18:16:21 +0200
commit2737c7fe8a24f18a7f1495781dbe34c4b8af5bed (patch)
tree2013d7f2014d94c74ce9e3ce14e40db1bc4e52da /gnu/packages/patches
parent531b63eba77e40ac65ed89bdba48f6174adf12d0 (diff)
downloadguix-2737c7fe8a24f18a7f1495781dbe34c4b8af5bed.tar.gz
gnu: mesa: Fix test failure on 32-bit systems.
* gnu/packages/patches/mesa-timespec-test-32bit.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/gl.scm (mesa)[source](patches): Add it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/mesa-timespec-test-32bit.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/gnu/packages/patches/mesa-timespec-test-32bit.patch b/gnu/packages/patches/mesa-timespec-test-32bit.patch
new file mode 100644
index 0000000000..3e4890f3a4
--- /dev/null
+++ b/gnu/packages/patches/mesa-timespec-test-32bit.patch
@@ -0,0 +1,17 @@
+Fix a test failure on 32-bit systems.
+
+Taken from upstream:
+https://gitlab.freedesktop.org/mesa/mesa/commit/dd1dba80b9ee74ec8b90761285a8262e374bf8ef
+
+diff --git a/src/util/tests/timespec/timespec_test.cpp b/src/util/tests/timespec/timespec_test.cpp
+--- a/src/util/tests/timespec/timespec_test.cpp
++++ b/src/util/tests/timespec/timespec_test.cpp
+@@ -206,7 +206,7 @@ TEST(timespec_test, timespec_from_nsec)
+ 
+    timespec_from_nsec(&a, UINT64_MAX);
+    EXPECT_EQ(a.tv_nsec, UINT64_MAX % NSEC_PER_SEC);
+-   EXPECT_EQ(a.tv_sec, UINT64_MAX / NSEC_PER_SEC);
++   EXPECT_EQ(a.tv_sec, (time_t)(UINT64_MAX / NSEC_PER_SEC));
+ }
+ 
+ TEST(timespec_test, timespec_from_usec)