Skip to content

Fix DAV1D_ERR to be compatible with emscripten/wasi

Brion Vibber requested to merge brion/dav1d:wasi-fix into master

The latest emscripten tip-of-tree version uses errno.h constants based on the wasi libc headers, which define their values with a typecast like ((__wasi_errno_t)63) which cannot be compared against 0 in the #if EPERM > 0 check originally used to determine whether errno values need negation.

Moved the condition check from the preprocessor into the #define's body, where C can understand the type and produce a suitable constant value at compile time.

Should not have any functional change.

Merge request reports