Blame patches/cvs-1.12.13.local.patch

24382b
diff -ru cvs-1.12.13.orig/src/main.c cvs-1.12.13/src/main.c
24382b
--- cvs-1.12.13.orig/src/main.c	2022-10-20 15:44:42.306215161 +0200
24382b
+++ cvs-1.12.13/src/main.c	2022-10-20 15:50:55.838352069 +0200
24382b
@@ -24,10 +24,6 @@
24382b
 #include "strftime.h"
24382b
 #include "xgethostname.h"
24382b
 
24382b
-#ifdef USE_LIBBSD
24382b
-uint32_t arc4random(void);
24382b
-#endif
24382b
-
24382b
 const char *program_name;
24382b
 const char *program_path;
24382b
 const char *cvs_cmd_name;
24382b
@@ -749,10 +745,13 @@
24382b
 
24382b
     /* Calculate the cvs global session ID */
24382b
 
24382b
+	int random;
24382b
+	getentropy(&random, sizeof(int));
24382b
+
24382b
     global_session_id = Xasprintf("1%010llX%04X%04X",
24382b
       (unsigned long long)time(NULL),
24382b
       (unsigned int)(getpid() & 0xFFFF),
24382b
-      (unsigned int)(arc4random() & 0xFFFF));
24382b
+      (unsigned int)random & 0xFFFF);
24382b
 
24382b
     TRACE (TRACE_FUNCTION, "main: Session ID is %s", global_session_id);
24382b