https://github.com/facebook/zstd/pull/1124 fixes an issue with GNU/Hurd
being unable to write to /dev/zero. Implemented fix is writing to
/dev/random instead.
On OpenBSD a regular user is unable to write to /dev/random because of
permissions set on this device. Result is failing a regression test.
Proposed solution should work for all platforms.
$DIFF -q tmp.md5.1 tmp.md5.2
}
+UNAME=$(uname)
+
isTerminal=false
if [ -t 0 ] && [ -t 1 ]
then
isWindows=false
INTOVOID="/dev/null"
-DEVDEVICE="/dev/random"
+case "$UNAME" in
+ OpenBSD) DEVDEVICE="/dev/zero" ;;
+ *) DEVDEVICE="/dev/random" ;;
+esac
case "$OS" in
Windows*)
isWindows=true
;;
esac
-UNAME=$(uname)
case "$UNAME" in
Darwin) MD5SUM="md5 -r" ;;
FreeBSD) MD5SUM="gmd5sum" ;;