Skip to content

Commit 10354f7

Browse files
committed
Solaris portability
1 parent 864f903 commit 10354f7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ check: tests phc-test
4343
@echo 'Running main tests'
4444
@time ./tests | tee TESTS-OUT
4545
@diff -U0 TESTS-OK TESTS-OUT && echo PASSED || echo FAILED
46-
@if [ -e PHC-TEST-OK-SHA256 ]; then \
46+
@if [ -f PHC-TEST-OK-SHA256 ]; then \
4747
echo 'Running PHC tests'; \
4848
time ./phc-test > PHC-TEST-OUT; \
49-
sha256sum -c PHC-TEST-OK-SHA256; \
49+
sha256sum -c PHC-TEST-OK-SHA256 || shasum -a 256 -c PHC-TEST-OK-SHA256; \
5050
fi
5151

5252
ref:

yescrypt-platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static void *alloc_region(yescrypt_region_t *region, size_t size)
6464
}
6565

6666
#else
67-
base = mmap(NULL, size, PROT_READ | PROT_WRITE, flags, -1, 0);
67+
base = (void *)mmap(NULL, size, PROT_READ | PROT_WRITE, flags, -1, 0);
6868
#endif
6969
if (base == MAP_FAILED)
7070
base = NULL;

0 commit comments

Comments
 (0)