Commit 30b5c720 authored by Jakub Kicinski's avatar Jakub Kicinski

tools: ynl-gen: cleanup user space header includes

Bots started screaming that we're including stdlib.h twice.
While at it move string.h into a common spot and drop stdio.h
which we don't need.
Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5464
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5466
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5467Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 7ec5d48f
......@@ -2323,8 +2323,8 @@ def main():
headers = ['uapi/' + parsed.uapi_header]
else:
cw.p('#include <stdlib.h>')
cw.p('#include <string.h>')
if args.header:
cw.p('#include <string.h>')
cw.p('#include <linux/types.h>')
else:
cw.p(f'#include "{parsed.name}-user.h"')
......@@ -2339,9 +2339,6 @@ def main():
if args.mode == "user":
if not args.header:
cw.p("#include <stdlib.h>")
cw.p("#include <stdio.h>")
cw.p("#include <string.h>")
cw.p("#include <libmnl/libmnl.h>")
cw.p("#include <linux/genetlink.h>")
cw.nl()
......
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