diff --git a/scripts/rust-libc-config.yml b/scripts/rust-libc-config.yml index 660f44e40d..7df21e6328 100644 --- a/scripts/rust-libc-config.yml +++ b/scripts/rust-libc-config.yml @@ -82,6 +82,9 @@ ignored_structs: - "epoll_event" - "ifreq" - "ifconf" + - "stat64" + - "statfs64" + - "statvfs64" # unix/linux_like/mod.rs - "in_addr" - "ip_mreq" @@ -164,6 +167,9 @@ ignored_var_declarations: - "error_print_progname" ignored_macros: + - "e_exit" + - "e_termination" + - "stat64" - "CHARBITS" - "CHAR_MAX" - "CHAR_MIN" @@ -335,6 +341,9 @@ ignored_macros: - "major" - "makedev" - "minor" + - "msqid_ds" + - "statvfs64" + - "ipc_perm" - "roundup" - "s6_addr" - "s6_addr16" @@ -1976,6 +1985,13 @@ force_macro_type: - "TIOCGWINSZ" - "TIOCSCTTY" - "TIOCSWINSZ" + - "SA_NOCLDSTOP" + - "SA_NOCLDWAIT" + - "SA_NODEFER" + - "SA_ONSTACK" + - "SA_RESETHAND" + - "SA_RESTART" + - "SA_SIGINFO" "::c_uint": - "IGNBRK" - "BRKINT" diff --git a/scripts/rust-libc.py b/scripts/rust-libc.py index 92eb323385..8496c35bef 100644 --- a/scripts/rust-libc.py +++ b/scripts/rust-libc.py @@ -17,6 +17,7 @@ import argparse import io +import os import pathlib import string import sys @@ -667,12 +668,12 @@ def parse(file: pathlib.Path, base_dir: pathlib.Path): colorama.just_fix_windows_console() - with io.open("scripts/rust-libc-config.yml", "r") as f: + with io.open(os.path.join(os.path.dirname(__file__), "rust-libc-config.yml"), "r") as f: config = yaml.load(f, yaml.CSafeLoader) path = pathlib.Path(args.path) - with io.open("scripts/rust-libc-header.rs", "r") as f: + with io.open(os.path.join(os.path.dirname(__file__), "rust-libc-header.rs"), "r") as f: emit(f.read()) state = State()