From 8c5eb657ff196a31a3230652823221f3fe805d73 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 1 Jan 2022 18:03:25 +0100 Subject: random: export __trivfs_server_name Making glibc access trivfs_server_name would violate namespace constraints, so we need to use a out-of-standard name. --- trans/Makefile | 1 + trans/random.c | 3 +++ 2 files changed, 4 insertions(+) (limited to 'trans') diff --git a/trans/Makefile b/trans/Makefile index 6cf50e7a..22c2d331 100644 --- a/trans/Makefile +++ b/trans/Makefile @@ -81,6 +81,7 @@ symlink: fsysServer.o fakeroot: ../libnetfs/libnetfs.a fifo new-fifo: ../libpipe/libpipe.a crash fifo firmlink hello hello-mt ifsock magic mtab new-fifo null password proxy-defpager remap streamio: ../libtrivfs/libtrivfs.a +random-LDFLAGS = -Wl,--export-dynamic-symbol=__trivfs_server_name $(targets): ../libfshelp/libfshelp.a \ ../libihash/libihash.a \ ../libiohelp/libiohelp.a \ diff --git a/trans/random.c b/trans/random.c index ae04e14f..e85bf65e 100644 --- a/trans/random.c +++ b/trans/random.c @@ -46,6 +46,9 @@ char *trivfs_server_name = "random"; +/* Referred by glibc to avoid using /dev/random for malloc() initialization */ +char *__trivfs_server_name = "random"; + /* Entropy pool. We use one of the SHAKE algorithms from the Keccak family. Being a sponge construction, it allows the extraction of arbitrary amounts of pseudorandom data. */ -- cgit v1.2.3