LINUX.ORG.RU

Статичная сборка dsniff

 ,


0

1

Динамичный бинарник собирается нормально, статичный совсем не хочет. Почему?

root@debian:~/DIST/dsniff-2.4b1+debian# make CFLAGS=-static LDFLAGS=-static
gcc -static -I.  -I./missing  -c ./missing/dummy.c
gcc -static -I.  -I./missing  -c ./missing/strlcpy.c
gcc -static -I.  -I./missing  -c ./missing/strlcat.c
gcc -static -I.  -I./missing  -c ./missing/md5.c
ar -cr libmissing.a dummy.o  strlcpy.o strlcat.o md5.o
ranlib libmissing.a
gcc -static -I.  -I./missing  -c ./arpspoof.c
In file included from ./arpspoof.c:27:0:
./arp.h:14:43: warning: ‘struct ether_addr’ declared inside parameter list [enabled by default]
./arpspoof.c:30:32: warning: ‘struct ether_addr’ declared inside parameter list [enabled by default]
./arpspoof.c:34:20: error: field ‘mac’ has incomplete type
./arpspoof.c: In function ‘arp_send’:
./arpspoof.c:72:22: warning: passing argument 1 of ‘ether_ntoa’ from incompatible pointer type [enabled by default]
./arpspoof.c:30:14: note: expected ‘struct ether_addr *’ but argument is of type ‘struct ether_addr *’
./arpspoof.c:76:23: warning: passing argument 1 of ‘ether_ntoa’ from incompatible pointer type [enabled by default]
./arpspoof.c:30:14: note: expected ‘struct ether_addr *’ but argument is of type ‘struct ether_addr *’
./arpspoof.c:82:23: warning: passing argument 1 of ‘ether_ntoa’ from incompatible pointer type [enabled by default]
./arpspoof.c:30:14: note: expected ‘struct ether_addr *’ but argument is of type ‘struct ether_addr *’
./arpspoof.c:85:23: warning: passing argument 1 of ‘ether_ntoa’ from incompatible pointer type [enabled by default]
./arpspoof.c:30:14: note: expected ‘struct ether_addr *’ but argument is of type ‘struct ether_addr *’
./arpspoof.c: In function ‘arp_find’:
./arpspoof.c:125:3: warning: passing argument 2 of ‘arp_cache_lookup’ from incompatible pointer type [enabled by default]
In file included from ./arpspoof.c:27:0:
./arp.h:14:5: note: expected ‘struct ether_addr *’ but argument is of type ‘struct ether_addr *’
make: *** [arpspoof.o] Ошибка 1

Заранее благодарю за ответ.

★★★★★

Нужно именно добавить -static в CFLAGS, а у вас получается так, что вы перезаписываете CFLAGS.

ValdikSS ★★★★★
()
Ответ на: комментарий от ValdikSS

Так тоже пробовал, сборка не идёт :(

IPR ★★★★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.