当我在内核的源代码中包含“asm/xen/hypercall.h”时,
我收到一条错误消息。我该如何解决?
include/linux/stddef.h:8:16: error: expected identifier or '(' before 'void'
#define NULL ((void *)0)
^
./arch/x86/include/asm/alternative.h:221:28: note: in expansion of macro 'NULL'
#define __parainstructions NULL
^
./arch/x86/include/asm/paravirt_types.h:703:35: note: in expansion of macro '__parainstructions'
extern struct paravirt_patch_site __parainstructions[],
^
include/linux/stddef.h:8:23: error: expected ')' before numeric constant
#define NULL ((void *)0)
^
./arch/x86/include/asm/alternative.h:221:28: note: in expansion of macro 'NULL'
#define __parainstructions NULL
^
./arch/x86/include/asm/paravirt_types.h:703:35: note: in expansion of macro '__parainstructions'
extern struct paravirt_patch_site __parainstructions[],
^
scripts/Makefile.build:257: recipe for target 'drivers/oxen/fallback.o' failed
最佳答案
XEN 功能依赖于 PARAVIRT(参见 arch/x86/xen/Kconfig)。
但行
#define __parainstructions NULL
at arch/x86/include/asm/alternative.h:221
仅在 PARAVIRT 被禁用时执行。因此,在这种情况下,您不应该使用 XEN header 。
关于linux - 在 Linux 内核中, header 包含错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30321000/