mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-30 08:30:53 +00:00
Fix windows and wasm builds
This commit is contained in:
parent
fc8d6a9e35
commit
e387de70e4
@ -220,9 +220,16 @@ R_API bool r_sandbox_enable(bool e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline int bytify(int v) {
|
static inline int bytify(int v) {
|
||||||
|
#if R2__WINDOWS__ || __wasi__
|
||||||
|
// on windows, there are no WEXITSTATUS, the return value is right there
|
||||||
|
unsigned int uv = (unsigned int)v;
|
||||||
|
return (int) ((uv > 255)? 1: 0);
|
||||||
|
#else
|
||||||
|
// on unix, return code is (system() >> 8) & 0xff
|
||||||
if (v == -1 || WIFEXITED (v)) {
|
if (v == -1 || WIFEXITED (v)) {
|
||||||
return WEXITSTATUS (v);
|
return WEXITSTATUS (v);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user