aboutsummaryrefslogtreecommitdiffstats
path: root/main/cryptsetup/disable-all-symbols-test.patch
blob: fd4fb007eaaf9578029dbf58b96e23ac63b94fee (plain) (blame)
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
32
33
34
35
The all-symbol-test.c file requires dlvsym which is a GNU extension and
presently not available on musl libc. This patch essentially makes
check_all_symbols a no-op, thereby disabling it without requiring
rebuilding the automake Makefiles.

diff -upr cryptsetup-2.4.0.orig/tests/all-symbols-test.c cryptsetup-2.4.0/tests/all-symbols-test.c
--- cryptsetup-2.4.0.orig/tests/all-symbols-test.c	2021-08-18 19:40:14.751188763 +0200
+++ cryptsetup-2.4.0/tests/all-symbols-test.c	2021-08-18 19:42:29.727938025 +0200
@@ -70,6 +70,7 @@ static void test_logf(int level, const c
 
 static int check_all_symbols(void *h)
 {
+#ifdef __GLIBC__
 	void *sym;
 	char *err;
 	unsigned scount = 0;
@@ -98,15 +99,15 @@ do {											\
 	scount++;									\
 } while (0);
 
-#include "test-symbols-list.h"
-#undef CHECK_SYMBOL
-
 	if (!scount) {
 		log_err("test-symbols-list.h file is probably empty.");
 		return 1;
 	}
 
 	log_std("Performed %u symbol checks in total\n.", scount);
+#include "test-symbols-list.h"
+#undef CHECK_SYMBOL
+#endif
 
 	return 0;
 }