1 #include <sys/types.h> 2 #if defined(__linux__) || defined(__EMSCRIPTEN__) 3 #include <sys/sysmacros.h> 4 #endif 5 6 // Since makedev is a macro instead of a function, it isn't available to FFI. 7 // libc must reimplement it, which is error-prone. This file provides FFI 8 // access to the actual macro so it can be tested against the Rust 9 // reimplementation. 10 makedev_ffi(unsigned major,unsigned minor)11dev_t makedev_ffi(unsigned major, unsigned minor) { 12 return makedev(major, minor); 13 } 14