From 90dad97fc07f049383903a166631e2c257f9b8c1 Mon Sep 17 00:00:00 2001 From: Kacper Date: Tue, 16 Dec 2025 17:02:05 +0100 Subject: Add support for TLS in the libc --- lib/libc/devctl/posix_devctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/libc/devctl/posix_devctl.c') diff --git a/lib/libc/devctl/posix_devctl.c b/lib/libc/devctl/posix_devctl.c index 59497833..01af3111 100644 --- a/lib/libc/devctl/posix_devctl.c +++ b/lib/libc/devctl/posix_devctl.c @@ -1,13 +1,13 @@ #include +#include #include #include int posix_devctl(int fildes, int dcmd, void *restrict dev_data_ptr, size_t __unused nbyte, int *restrict dev_info_ptr) { - int r; + int r = syscall(ioctl, fildes, dcmd, dev_data_ptr); - r = syscall(ioctl, fildes, dcmd, dev_data_ptr); - if (r < 0) + if (__predict_false(r < 0)) return errno; *dev_info_ptr = r; -- cgit v1.2.3