From fa80ce6023c76dab34133d43f8c8f831a949fbf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Fri, 6 Aug 2021 15:17:49 -0400 Subject: [PATCH] resolv: make res_randomid use random_bits() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is at least "more random" than 0xffff & __getpid (); Signed-off-by: Cristian Rodríguez Reviewed-by: Adhemerval Zanella --- resolv/res_randomid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resolv/res_randomid.c b/resolv/res_randomid.c index 546daf4c8b..366429c9f4 100644 --- a/resolv/res_randomid.c +++ b/resolv/res_randomid.c @@ -84,9 +84,10 @@ #include #include +#include unsigned int res_randomid (void) { - return 0xffff & __getpid (); + return 0xffff & random_bits (); } libc_hidden_def (__res_randomid)