Browse Source

Update Travis from trusty to xenial. (#84)

* Update Travis from trusty to xenial.

* Don't use getentropy on GLIBC < 2.25.
pull/93/head
Dan Gohman 6 years ago
committed by GitHub
parent
commit
7378a0bfbe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .travis.yml
  2. 9
      wasmtime-wasi/sandboxed-system-primitives/src/config.h

2
.travis.yml

@ -17,7 +17,7 @@ matrix:
# Similarly, we don't need to hold up people using stable while we wait # Similarly, we don't need to hold up people using stable while we wait
# for the results which may fail. # for the results which may fail.
fast_finish: true fast_finish: true
dist: trusty dist: xenial
sudo: false sudo: false
before_script: before_script:
# If an old version of rustfmt from cargo is already installed, uninstall # If an old version of rustfmt from cargo is already installed, uninstall

9
wasmtime-wasi/sandboxed-system-primitives/src/config.h

@ -12,13 +12,20 @@
#ifndef CONFIG_H #ifndef CONFIG_H
#define CONFIG_H #define CONFIG_H
#include <stdlib.h>
#if defined(__FreeBSD__) || defined(__APPLE__) #if defined(__FreeBSD__) || defined(__APPLE__)
#define CONFIG_HAS_ARC4RANDOM_BUF 1 #define CONFIG_HAS_ARC4RANDOM_BUF 1
#else #else
#define CONFIG_HAS_ARC4RANDOM_BUF 0 #define CONFIG_HAS_ARC4RANDOM_BUF 0
#endif #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 #define CONFIG_HAS_GETENTROPY 1
#else #else
#define CONFIG_HAS_GETENTROPY 0 #define CONFIG_HAS_GETENTROPY 0

Loading…
Cancel
Save