diff --git a/include/libbb.h b/include/libbb.h index 8229f055a..31a1e46a4 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -62,6 +62,11 @@ # include #endif #include +#ifdef __GNO__ +/* Fix definition of WEXITSTATUS to support values with the high bit set. */ +# undef WEXITSTATUS +# define WEXITSTATUS(x) (((*(int *)&(x)) >> 8) & 0xFF) +#endif #include #include #include