内核驱动编译报错信息如下:
error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
解决:
在报错的驱动代码Makefile文件中添加如下内容:
ccflags-y += -Wno-error
ccflags-y += -Wno-expansion-to-defined
内核驱动编译报错信息如下:
error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
解决:
在报错的驱动代码Makefile文件中添加如下内容:
ccflags-y += -Wno-error
ccflags-y += -Wno-expansion-to-defined