this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Correct __real_ioctl usage in lkm.c

+6 -4
+6 -4
src/kernel/mach_server/client/lkm.c
··· 1 1 #include "lkm.h" 2 2 #include "../../lkm/api.h" 3 + #include <fcntl.h> 4 + #include <unistd.h> 3 5 4 - int driver_fd; 6 + int driver_fd = -1; 7 + 8 + extern int __real_ioctl(int fd, int cmd, void* arg); 5 9 6 10 void mach_driver_init(void) 7 11 { ··· 17 21 abort(); 18 22 } 19 23 20 - if (ioctl(driver_fd, NR_get_api_version, 0) != DARLING_MACH_API_VERSION) 24 + if (__real_ioctl(driver_fd, NR_get_api_version, 0) != DARLING_MACH_API_VERSION) 21 25 { 22 26 const char* msg = "Darling Mach kernel module reports different API level. Aborting.\n"; 23 27 ··· 25 29 abort(); 26 30 } 27 31 } 28 - 29 - extern int __real_ioctl(int fd, int cmd, void* arg); 30 32 31 33 // Emulated ioctl implementation 32 34 int ioctl(int fd, int cmd, void* arg)