diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch b/meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch new file mode 100644 index 0000000000..75f6b9094a --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From be02bd0876a061728661535a709d313e39fe1ac3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 8 Nov 2022 13:31:34 -0800 | ||
4 | Subject: [PATCH 18/22] test-bus-error: strerror() is assumed to be GNU | ||
5 | specific version mark it so | ||
6 | |||
7 | Upstream-Status: Inappropriate [Upstream systemd only supports glibc] | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | src/libsystemd/sd-bus/test-bus-error.c | 2 ++ | ||
12 | src/test/test-errno-util.c | 3 ++- | ||
13 | 2 files changed, 4 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/src/libsystemd/sd-bus/test-bus-error.c b/src/libsystemd/sd-bus/test-bus-error.c | ||
16 | index a55f3f9856..4123bf3da0 100644 | ||
17 | --- a/src/libsystemd/sd-bus/test-bus-error.c | ||
18 | +++ b/src/libsystemd/sd-bus/test-bus-error.c | ||
19 | @@ -99,7 +99,9 @@ TEST(error) { | ||
20 | assert_se(!sd_bus_error_is_set(&error)); | ||
21 | assert_se(sd_bus_error_set_errno(&error, EBUSY) == -EBUSY); | ||
22 | assert_se(streq(error.name, "System.Error.EBUSY")); | ||
23 | +#ifdef __GLIBC__ | ||
24 | assert_se(streq(error.message, STRERROR(EBUSY))); | ||
25 | +#endif | ||
26 | assert_se(sd_bus_error_has_name(&error, "System.Error.EBUSY")); | ||
27 | assert_se(sd_bus_error_get_errno(&error) == EBUSY); | ||
28 | assert_se(sd_bus_error_is_set(&error)); | ||
29 | diff --git a/src/test/test-errno-util.c b/src/test/test-errno-util.c | ||
30 | index 376d532281..967cfd4d67 100644 | ||
31 | --- a/src/test/test-errno-util.c | ||
32 | +++ b/src/test/test-errno-util.c | ||
33 | @@ -4,7 +4,7 @@ | ||
34 | #include "stdio-util.h" | ||
35 | #include "string-util.h" | ||
36 | #include "tests.h" | ||
37 | - | ||
38 | +#ifdef __GLIBC__ | ||
39 | TEST(strerror_not_threadsafe) { | ||
40 | /* Just check that strerror really is not thread-safe. */ | ||
41 | log_info("strerror(%d) → %s", 200, strerror(200)); | ||
42 | @@ -46,6 +46,7 @@ TEST(STRERROR_OR_ELSE) { | ||
43 | log_info("STRERROR_OR_ELSE(EPERM, \"EOF\") → %s", STRERROR_OR_EOF(EPERM)); | ||
44 | log_info("STRERROR_OR_ELSE(-EPERM, \"EOF\") → %s", STRERROR_OR_EOF(-EPERM)); | ||
45 | } | ||
46 | +#endif /* __GLIBC__ */ | ||
47 | |||
48 | TEST(PROTECT_ERRNO) { | ||
49 | errno = 12; | ||
50 | -- | ||
51 | 2.34.1 | ||
52 | |||