mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-20 00:05:34 +03:00
Bug: https://bugs.gentoo.org/935573 Closes: https://bugs.gentoo.org/847850 Signed-off-by: Sam James <sam@gentoo.org>
29 lines
1.3 KiB
Diff
29 lines
1.3 KiB
Diff
https://github.com/martinpitt/umockdev/commit/9e68706bfbc4185c7b65550fdc94dd14a6e5ffd6
|
|
|
|
From 9e68706bfbc4185c7b65550fdc94dd14a6e5ffd6 Mon Sep 17 00:00:00 2001
|
|
From: Martin Pitt <martin@piware.de>
|
|
Date: Sun, 5 Jan 2025 14:58:52 +0100
|
|
Subject: [PATCH] tests: Fix ioctl data type
|
|
|
|
The `0xdeadbeef` constant in Vala is implicitly an int64. On 32 bit
|
|
big-endian architectures like powerpc this argument vanishes during its
|
|
interpretation through varargs and long (i.e. gets shifted to the second
|
|
argument, which we never look at). Explicitly make it an int.
|
|
--- a/tests/test-umockdev-vala.vala
|
|
+++ b/tests/test-umockdev-vala.vala
|
|
@@ -1140,10 +1140,11 @@ E: SUBSYSTEM=test
|
|
int fd = Posix.open ("/dev/test", Posix.O_RDWR, 0);
|
|
assert_cmpint (fd, CompareOperator.GE, 0);
|
|
|
|
- assert_cmpint (Posix.ioctl (fd, 1, 0xdeadbeef), CompareOperator.EQ, (int) 0xdeadbeef);
|
|
+ int value = (int) 0xdeadbeef;
|
|
+ assert_cmpint (Posix.ioctl (fd, 1, value), CompareOperator.EQ, value);
|
|
assert_cmpint (Posix.errno, CompareOperator.EQ, 0);
|
|
|
|
- assert_cmpint (Posix.ioctl (fd, 2, 0xdeadbeef), CompareOperator.EQ, -1);
|
|
+ assert_cmpint (Posix.ioctl (fd, 2, value), CompareOperator.EQ, -1);
|
|
assert_cmpint (Posix.errno, CompareOperator.EQ, Posix.ENOMEM);
|
|
|
|
assert_cmpint (Posix.ioctl (fd, 3, &ioctl_target), CompareOperator.EQ, 0);
|
|
|