Fix nr_from_src.py

This commit is contained in:
Amanieu d'Antras 2017-11-05 21:38:47 +00:00
parent c382132a4f
commit 13cb9dac3d

View file

@ -44,6 +44,8 @@ def load_headers(names: Iterable[Tuple[str, str]], arch: str, extra: str = ''):
f.write('\n')
f.write('#include <asm/unistd.h>\n')
for prefix, name in names:
if prefix is None:
prefix = ''
f.write('gen_nr {prefix}{name} __{prefix}NR_{name}\n'.format(prefix=prefix, name=name))
f.flush()
lines = subprocess.check_output(['gcc', '-nostdinc',