You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running make in /Linux-ESPNOW/wifiRawEcho on a Raspberry Pi with Debian 11 (Bullseye) I get:
rm -f bin/*
gcc -g -Wall --std=c99 -I Includes/ -o bin/main.o -c src/main.c
src/main.c: In function ‘create_raw_socket’:
src/main.c:145:2: warning: implicit declaration of function ‘bzero’ [-Wimplicit-function-declaration]
145 | bzero(&s_dest_addr, sizeof(s_dest_addr));
| ^~~~~
src/main.c:169:44: error: ‘SO_ATTACH_FILTER’ undeclared (first use in this function)
169 | filter_errno = setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, bpf, sizeof(*bpf));
| ^~~~~~~~~~~~~~~~
src/main.c:169:44: note: each undeclared identifier is reported only once for each function it appears in
src/main.c:173:46: error: ‘SO_PRIORITY’ undeclared (first use in this function); did you mean ‘IFLA_PRIORITY’?
173 | priority_errno = setsockopt(fd, SOL_SOCKET, SO_PRIORITY, &priority, sizeof(priority));
| ^~~~~~~~~~~
| IFLA_PRIORITY
src/main.c: In function ‘main’:
src/main.c:184:2: warning: implicit declaration of function ‘nice’ [-Wimplicit-function-declaration]
184 | nice(PRIORITY_LVL);
| ^~~~
src/main.c:188:6: warning: unused variable ‘packets_received’ [-Wunused-variable]
188 | int packets_received = 0;
| ^~~~~~~~~~~~~~~~
At top level:
src/main.c:25:16: warning: ‘broadcast_mac’ defined but not used [-Wunused-variable]
25 | static uint8_t broadcast_mac[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
| ^~~~~~~~~~~~~
make: *** [Makefile:9: main.o] Error 1
Am I missing something (some declaration for SO_ATTACH_FILTER and SO_PRIORITY ?) that has to be installed for successfull compilation? Couldn't find any hints when google'ing... TIA!
The text was updated successfully, but these errors were encountered:
Many thanks for your effort @thomasfla!
Hi @sheilbronn, I wish to test this code myself, it looks exactly what I need for my project. Had the same compilation issue myself on a Raspberry Pi Zero and on my Ubuntu machine; removing --std=c99 helps a bit. Finally I changed the Makefile to:
When running
make
in/Linux-ESPNOW/wifiRawEcho
on a Raspberry Pi with Debian 11 (Bullseye) I get:Am I missing something (some declaration for SO_ATTACH_FILTER and SO_PRIORITY ?) that has to be installed for successfull compilation? Couldn't find any hints when google'ing... TIA!
The text was updated successfully, but these errors were encountered: