天天看點

編譯核心出現implicit declaration of function 'iowrite16be'解決方法

完整錯誤資訊:

drivers/gpio/janz-ttl.c: In function 'ttl_set_value':
drivers/gpio/janz-ttl.c:107:2: error: implicit declaration of function 'iowrite16be' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

scripts/Makefile.build:311: recipe for target 'drivers/gpio/janz-ttl.o' failed
make[2]: *** [drivers/gpio/janz-ttl.o] Error 1
scripts/Makefile.build:441: recipe for target 'drivers/gpio' failed
make[1]: *** [drivers/gpio] Error 2
Makefile:945: recipe for target 'drivers' failed
make: *** [drivers] Error 2
           

解決方法:

gedit drivers/gpio/janz-ttl.c

在前面加上下述定義

#define iowrite16be(v, addr) iowrite16(be16_to_cpu(v), (addr))

方法來自:https://zhidao.baidu.com/question/323522025.html

繼續閱讀