# [PATCH 11/12] config.mak.uname; add arc4random to the cygwin build

1 messages from 2025-03-15 to 2025-03-15. Participants: Ramsay Jones.
Thread: https://gitlist.dev/t/63128

## Ramsay Jones, 2025-03-15 02:49

Subject: [PATCH 11/12] config.mak.uname; add arc4random to the cygwin build
Message-ID: <90accf50-324a-4bec-b219-f1ca522283cf@ramsayjones.plus.com>
URL: https://gitlist.dev/e/90accf50-324a-4bec-b219-f1ca522283cf%40ramsayjones.plus.com

```

The arc4random_buf() function has been available in cygwin since
about 2016 (somewhere in the v2.x branch). Set the CSPRNG_METHOD
build variable to 'arc4random', in the cygwin section, to enable
the use of this cryptographically-secure pseudorandom number
function. Note that the autoconf and new meson builds also enable
this function.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
 config.mak.uname | 1 +
 1 file changed, 1 insertion(+)

diff --git a/config.mak.uname b/config.mak.uname
index 0e29341056..4f6770a5f4 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -254,6 +254,7 @@ ifeq ($(uname_O),Cygwin)
 	HAVE_CLOCK_GETTIME=YesPlease
 	HAVE_CLOCK_MONOTONIC=YesPlease
 	HAVE_SYSINFO = YesPlease
+	CSPRNG_METHOD = arc4random
 	HAVE_ALLOCA_H = YesPlease
 	NEEDS_LIBICONV = YesPlease
 	NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes
-- 
2.49.0

```
