diff --git a/src/system/libroot/os/fs_info.c b/src/system/libroot/os/fs_info.c index d9bb11d158..f9adec53b9 100644 --- a/src/system/libroot/os/fs_info.c +++ b/src/system/libroot/os/fs_info.c @@ -12,16 +12,7 @@ #include #include - - -#define RETURN_AND_SET_ERRNO(status) \ - { \ - if (status < 0) { \ - __set_errno(status); \ - return -1; \ - } \ - return status; \ - } +#include dev_t diff --git a/src/system/libroot/posix/sys/rlimit.c b/src/system/libroot/posix/sys/rlimit.c index a5a94dc05f..f02a0f2a67 100644 --- a/src/system/libroot/posix/sys/rlimit.c +++ b/src/system/libroot/posix/sys/rlimit.c @@ -9,14 +9,7 @@ #include #include - - -#define RETURN_AND_SET_ERRNO(err) \ - if (err < 0) { \ - __set_errno(err); \ - return -1; \ - } \ - return err; +#include int diff --git a/src/system/libroot/posix/sys/uio.c b/src/system/libroot/posix/sys/uio.c index 3f71b4c286..380b33be88 100644 --- a/src/system/libroot/posix/sys/uio.c +++ b/src/system/libroot/posix/sys/uio.c @@ -10,14 +10,7 @@ #include #include - - -#define RETURN_AND_SET_ERRNO(err) \ - if (err < 0) { \ - __set_errno(err); \ - return -1; \ - } \ - return err; +#include ssize_t diff --git a/src/system/libroot/posix/unistd/process.c b/src/system/libroot/posix/unistd/process.c index 5714c6ec3b..bc0d928dc6 100644 --- a/src/system/libroot/posix/unistd/process.c +++ b/src/system/libroot/posix/unistd/process.c @@ -12,14 +12,7 @@ #include #include - - -#define RETURN_AND_SET_ERRNO(err) \ - if (err < 0) { \ - __set_errno(err); \ - return -1; \ - } \ - return err; +#include extern thread_id __main_thread_id; diff --git a/src/system/libroot/posix/unistd/truncate.c b/src/system/libroot/posix/unistd/truncate.c index cd5dd152b0..3ef0bb087d 100644 --- a/src/system/libroot/posix/unistd/truncate.c +++ b/src/system/libroot/posix/unistd/truncate.c @@ -12,14 +12,7 @@ #include #include - - -#define RETURN_AND_SET_ERRNO(err) \ - if (err < 0) { \ - __set_errno(err); \ - return -1; \ - } \ - return err; +#include int diff --git a/src/system/libroot/posix/utime.c b/src/system/libroot/posix/utime.c index 5fa8d26402..1fdfd1725d 100644 --- a/src/system/libroot/posix/utime.c +++ b/src/system/libroot/posix/utime.c @@ -13,14 +13,7 @@ #include #include - - -#define RETURN_AND_SET_ERRNO(err) \ - if (err < 0) { \ - __set_errno(err); \ - return -1; \ - } \ - return err; +#include int