12add0d91Sopenharmony_ci#include <sys/types.h> 22add0d91Sopenharmony_ci#if defined(__linux__) || defined(__EMSCRIPTEN__) 32add0d91Sopenharmony_ci#include <sys/sysmacros.h> 42add0d91Sopenharmony_ci#endif 52add0d91Sopenharmony_ci 62add0d91Sopenharmony_ci// Since makedev is a macro instead of a function, it isn't available to FFI. 72add0d91Sopenharmony_ci// libc must reimplement it, which is error-prone. This file provides FFI 82add0d91Sopenharmony_ci// access to the actual macro so it can be tested against the Rust 92add0d91Sopenharmony_ci// reimplementation. 102add0d91Sopenharmony_ci 112add0d91Sopenharmony_cidev_t makedev_ffi(unsigned major, unsigned minor) { 122add0d91Sopenharmony_ci return makedev(major, minor); 132add0d91Sopenharmony_ci} 14