From: Waldemar Kozaczuk <jwkozac...@gmail.com>
Committer: Waldemar Kozaczuk <jwkozac...@gmail.com>
Branch: master
Added res_init needed to run Rust apps on OSv
The res_init() function is part of the libresolv library (see resolver(3)
manual page)
which OSv pretends to implement. Rust applications need it and this patch
adds nop implementation of res_init and corresponding alias symbol
__rest_init().
Signed-off-by: Waldemar Kozaczuk <jwkozac...@gmail.com>
---
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1381,6 +1381,7 @@ musl += network/getservbyport.o
libc += network/getifaddrs.o
libc += network/if_nameindex.o
musl += network/if_freenameindex.o
+libc += network/res_init.o
musl += prng/rand.o
musl += prng/rand_r.o
diff --git a/libc/network/res_init.c b/libc/network/res_init.c
--- a/libc/network/res_init.c
+++ b/libc/network/res_init.c
@@ -0,0 +1,7 @@
+#include "libc.h"
+
+int res_init()
+{
+ return 0;
+}
+weak_alias(res_init, __res_init);
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.