mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
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: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
3f06760c00
commit
91dfaef243
1 changed files with 7 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue