Commit 91dfaef2 authored by Jakub Kicinski's avatar Jakub Kicinski

tools: ynl-gen: add extra headers for user space

Make sure all relevant headers are included, we allocate memory,
use memcpy() and Linux types without including the headers.
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 3f06760c
......@@ -2103,6 +2103,13 @@ def main():
cw.nl()
headers = ['uapi/' + parsed.uapi_header]
else:
cw.p('#include <stdlib.h>')
if args.header:
cw.p('#include <string.h>')
cw.p('#include <linux/types.h>')
else:
cw.p(f'#include "{parsed.name}-user.h"')
cw.p('#include "ynl.h"')
headers = [parsed.uapi_header]
for definition in parsed['definitions']:
if 'header' in definition:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment