1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 18:15:18 -07:00

Don't even include signal.h on WASI

Since version 11, wasi-sysroot doesn't ignore it but spits out
an error instead.
This commit is contained in:
Frank Denis 2020-06-04 10:40:25 +02:00
parent 824c8cdf69
commit 2ea21b96e0
4 changed files with 11 additions and 4 deletions

View File

@ -16,7 +16,7 @@ jobs:
curl https://get.wasmer.io -sSfL | sh curl https://get.wasmer.io -sSfL | sh
displayName: Install wasmer displayName: Install wasmer
- script: | - script: |
curl -sL -o - https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-10/wasi-sdk-10.0-linux.tar.gz | tar xz -f - -C /opt/ curl -sL -o - https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-11/wasi-sdk-11.0-linux.tar.gz | tar xz -f - -C /opt/
sudo mv /opt/wasi-sdk-* /opt/wasi-sdk sudo mv /opt/wasi-sdk-* /opt/wasi-sdk
sudo ln -s /opt/wasi-sdk/share/*sysroot* /opt/wasi-sysroot sudo ln -s /opt/wasi-sdk/share/*sysroot* /opt/wasi-sysroot
displayName: Install the WASI SDK displayName: Install the WASI SDK

View File

@ -4,12 +4,15 @@
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include <limits.h> #include <limits.h>
#include <signal.h>
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#ifndef __wasm__
# include <signal.h>
#endif
#ifdef HAVE_SYS_MMAN_H #ifdef HAVE_SYS_MMAN_H
# include <sys/mman.h> # include <sys/mman.h>
#endif #endif

View File

@ -3,7 +3,9 @@
#include <sys/types.h> #include <sys/types.h>
#include <limits.h> #include <limits.h>
#include <signal.h> #ifdef HAVE_CATCHABLE_SEGV
# include <signal.h>
#endif
#define TEST_NAME "sodium_utils2" #define TEST_NAME "sodium_utils2"
#include "cmptest.h" #include "cmptest.h"

View File

@ -3,7 +3,9 @@
#include <sys/types.h> #include <sys/types.h>
#include <limits.h> #include <limits.h>
#include <signal.h> #ifdef HAVE_CATCHABLE_SEGV
# include <signal.h>
#endif
#define TEST_NAME "sodium_utils3" #define TEST_NAME "sodium_utils3"
#include "cmptest.h" #include "cmptest.h"