--- ./Sources/UInt256+arc4random.swift.org 2020-08-23 16:52:45.000000000 +0900 +++ ./Sources/UInt256+arc4random.swift 2020-08-31 08:47:10.760000000 +0900 @@ -32,7 +32,11 @@ func generateRandom(within highBits: UInt32) -> UInt64 { let high: UInt32 = arc4random_uniform(highBits) +#if false//!os(Linux) let low: UInt32 = arc4random() +#else + let low: UInt32 = UInt32.random(in: 0...UInt32.max) +#endif let result: UInt64 = UInt64(high) << 32 + UInt64(low) return result } @@ -65,8 +69,13 @@ } func arc4random64() -> UInt64 { +#if false//!os(Linux) let high: UInt32 = arc4random() let low: UInt32 = arc4random() +#else + let high: UInt32 = UInt32.random(in: 0...UInt32.max) + let low: UInt32 = UInt32.random(in: 0...UInt32.max) +#endif let result: UInt64 = UInt64(high) << 32 + UInt64(low) return result } --- ./makefile.org 2020-08-28 18:02:02.000000000 +0900 +++ ./makefile 2020-08-31 09:07:03.650000000 +0900 @@ -2,6 +2,9 @@ EXES=$(SRCS:%.swift=%) SWIFTCFLAGS=-O +ifeq ($(shell uname -s),Linux) +SWIFTCFLAGS= +endif all: $(EXES) $(EXES:%=outs/%.out)