Skip to content

incompatible pointer type on RPi 4.14.79-v7+ #1

Description

On the current Raspberry Pi Kernel 4.14.79-v7+ I get the error of initialization from incompatible pointer type when compiling. The second error is ‘struct net_device’ has no member named ‘destructor’.

make M=/root/esp8266 -C /usr/src/linux-headers-$(uname -r)/ modules
make[1]: Entering directory '/usr/src/linux-headers-4.14.79-v7+'
CC [M] /root/esp8266/esp8266.o
/root/esp8266/esp8266.c: In function ‘byte_destuff_packet’:
/root/esp8266/esp8266.c:103:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
int flag = 0;
^~~
/root/esp8266/esp8266.c: In function ‘esp_cfg80211_scan’:
/root/esp8266/esp8266.c:365:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
struct msg_wifi_scan_request msg_scan;
^~~~~~
/root/esp8266/esp8266.c: In function ‘esp_cfg80211_connect’:
/root/esp8266/esp8266.c:384:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
struct esp8266 *esp = netdev_priv(dev);
^~~~~~
/root/esp8266/esp8266.c:388:33: warning: passing argument 2 of ‘generate_connect_header’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
generate_connect_header(&conf, sme->ssid, sme->ssid_len, sme->key, sme->key_len);
^~~
/root/esp8266/esp8266.c:242:13: note: expected ‘char *’ but argument is of type ‘const u8 * {aka const unsigned char *}’
static void generate_connect_header(struct msg_station_conf *conf, char *ssid, size_t ssid_len, char *password, uint8_t password_len)
^~~~~~~~~~~~~~~~~~~~~~~
/root/esp8266/esp8266.c:388:59: warning: passing argument 4 of ‘generate_connect_header’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
generate_connect_header(&conf, sme->ssid, sme->ssid_len, sme->key, sme->key_len);
^~~
/root/esp8266/esp8266.c:242:13: note: expected ‘char *’ but argument is of type ‘const u8 * {aka const unsigned char *}’
static void generate_connect_header(struct msg_station_conf *conf, char *ssid, size_t ssid_len, char *password, uint8_t password_len)
^~~~~~~~~~~~~~~~~~~~~~~
/root/esp8266/esp8266.c: At top level:
/root/esp8266/esp8266.c:413:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.disconnect = esp_cfg80211_disconnect,
^~~~~~~~~~~~~~~~~~~~~~~
/root/esp8266/esp8266.c:413:17: note: (near initialization for ‘esp_cfg80211_ops.disconnect’)
/root/esp8266/esp8266.c: In function ‘esp_setup’:
/root/esp8266/esp8266.c:432:5: error: ‘struct net_device’ has no member named ‘destructor’; did you mean ‘priv_destructor’?
dev->destructor = esp_free_netdev;
^~
/root/esp8266/esp8266.c: In function ‘esp_inform_bss’:
/root/esp8266/esp8266.c:564:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
struct msg_wifi_scan_entry entry;
^~~~~~
/root/esp8266/esp8266.c:568:6: warning: unused variable ‘signal’ [-Wunused-variable]
s32 signal = -30;
^~~~~~
/root/esp8266/esp8266.c: In function ‘esptty_receive_buf’:
/root/esp8266/esp8266.c:624:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
struct esp8266 *esp = tty->disc_data;
^~~~~~
/root/esp8266/esp8266.c: In function ‘esptty_write_wakeup’:
/root/esp8266/esp8266.c:680:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
struct esp8266 *esp = tty->disc_data;
^~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:328: recipe for target '/root/esp8266/esp8266.o' failed
make[2]: *** [/root/esp8266/esp8266.o] Error 1
Makefile:1527: recipe for target 'module/root/esp8266' failed
make[1]: *** [module/root/esp8266] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.14.79-v7+'
Makefile:5: recipe for target 'all' failed
make: *** [all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions