mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-02 08:02:36 +00:00
- Fixes https://github.com/termux/termux-packages/issues/25258 - After210d6c0847, `nmap` has upgraded to a `libdnet` 1.18.0. Unfortunately, this version of `libdnet` includes a malformed autotools configure-time compiler check for the definition of `ETH_P_ALL` that has a function defintion inside another function definition, causing a near-silent error `error: function definition is not allowed here` when **Clang** is used to compile (as opposed to GCC, which is somehow able to successfully compile the same code):06ecd5d459/configure (L15565-L15571)- This works around the problem by patching the `libdnet-stripped/configure` file to run the check in such a way that the code checking for `ETH_P_ALL` properly compiles with no errors. - Issue opened upstream here: https://github.com/ofalk/libdnet/issues/109
32 lines
828 B
Diff
32 lines
828 B
Diff
Fixes this error in the configure-time test for "Linux PF_PACKET sockets":
|
|
|
|
test.c:7:11: error: function definition is not allowed here
|
|
7 | int foo() { return ETH_P_ALL; }
|
|
| ^
|
|
1 error generated.
|
|
|
|
Which changes this configure log message:
|
|
checking for Linux PF_PACKET sockets... no
|
|
|
|
to this:
|
|
checking for Linux PF_PACKET sockets... yes
|
|
|
|
which fixes this error in the command 'sudo nping --arp 192.168.12.1':
|
|
|
|
doArp: failed to open device wlan0
|
|
|
|
--- a/libdnet-stripped/configure
|
|
+++ b/libdnet-stripped/configure
|
|
@@ -15116,10 +15116,10 @@ printf %s "checking for Linux PF_PACKET sockets... " >&6; }
|
|
/* end confdefs.h. */
|
|
#include <netpacket/packet.h>
|
|
#include <linux/if_ether.h>
|
|
+int foo() { return ETH_P_ALL; }
|
|
int
|
|
main (void)
|
|
{
|
|
-int foo() { return ETH_P_ALL; }
|
|
;
|
|
return 0;
|
|
}
|