Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ matrix:
# Similarly, we don't need to hold up people using stable while we wait
# for the results which may fail.
fast_finish: true
dist: trusty
dist: xenial
sudo: false
before_script:
# If an old version of rustfmt from cargo is already installed, uninstall
Expand Down
9 changes: 8 additions & 1 deletion wasmtime-wasi/sandboxed-system-primitives/src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,20 @@
#ifndef CONFIG_H
#define CONFIG_H

#include <stdlib.h>

#if defined(__FreeBSD__) || defined(__APPLE__)
#define CONFIG_HAS_ARC4RANDOM_BUF 1
#else
#define CONFIG_HAS_ARC4RANDOM_BUF 0
#endif

#ifdef __linux__
// On Linux, prefer to use getentropy, though it isn't available in
// GLIBC before 2.25.
#if defined(__linux__) && \
(!defined(__GLIBC__) || \
__GLIBC__ > 2 || \
(__GLIBC__ == 2 && __GLIBC_MINOR__ >= 25))
#define CONFIG_HAS_GETENTROPY 1
#else
#define CONFIG_HAS_GETENTROPY 0
Expand Down