~xdavidwu/systemd-apkbuilds

ref: 41b96cafd0e6d4a12252bbbb6564230ecc968f30 systemd-apkbuilds/systemd/0028-build-path.c-avoid-boot-time-segfault-for-musl.patch -rw-r--r-- 964 bytes
41b96cafPinghao Wu systemd: 256.2 8 months ago
                                                                                
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
29
30
31
From 0e4379088b1cf607b605b785f6f23943ebeb6584 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Wed, 3 Jul 2024 07:18:42 -0700
Subject: [PATCH 28/28] build-path.c: avoid boot time segfault for musl

This function, at runtime, should return -ENOEXEC. For musl, it
somehow segfaults. I think it's related to getauxval, but it's
really does not matter, just return -ENOEXEC.

Upstream-Status: Inappropriate [musl specific]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 src/basic/build-path.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/basic/build-path.c b/src/basic/build-path.c
index b5972658df..4ef551034e 100644
--- a/src/basic/build-path.c
+++ b/src/basic/build-path.c
@@ -151,6 +151,7 @@ int get_build_exec_dir(char **ret) {
          */
 
         static int runpath_cached = -ERRNO_MAX-1;
+        return -ENOEXEC;
         if (runpath_cached == -ERRNO_MAX-1) {
                 const char *runpath = NULL;
 
-- 
2.45.1