xref: /rust-libc-0.2.174/libc-test/src/makedev.c (revision e76c2bed)
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 
11 dev_t makedev_ffi(unsigned major, unsigned minor) {
12 	return makedev(major, minor);
13 }
14