Исходники IPCAD взял отсюда. Скофигурировал:
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for bison... no
checking for byacc... no
checking for flex... no
checking for lex... no
checking for yywrap in -lfl... no
checking for yywrap in -ll... no
checking for pthread_detach... no
checking for pthread_detach in -lc... yes
checking for working pthreads... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for netinet/in.h... yes
checking for netinet/in_systm.h... yes
checking for net/if.h... yes
checking for net/route.h... yes
checking for ifaddrs.h... yes
checking for netinet/ip.h... yes
checking for netinet/tcp.h... yes
checking for net/ethernet.h... yes
checking for netinet/if_ether.h... yes
checking asm/types.h usability... yes
checking asm/types.h presence... yes
checking for asm/types.h... yes
checking linux/socket.h usability... yes
checking linux/socket.h presence... yes
checking for linux/socket.h... yes
checking for linux/netlink.h... yes
checking for linux/netfilter.h... no
checking for linux/if.h... no
checking for linux/netfilter_ipv4/ipt_ULOG.h... yes
checking for linux/netfilter_ipv4/ip_queue.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking sysexits.h usability... yes
checking sysexits.h presence... yes
checking for sysexits.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for socket in -lsocket... no
checking for inet_pton in -lnsl... yes
checking packet source type... pcap
checking net/bpf.h usability... no
checking net/bpf.h presence... no
checking for net/bpf.h... no
checking pcap.h usability... yes
checking pcap.h presence... yes
checking for pcap.h... yes
checking for pcap_open_live in -lpcap... yes
checking libipq.h usability... no
checking libipq.h presence... no
checking for libipq.h... no
checking pcap_findalldevs... yes
checking interface access type... linux
checking for an ANSI C-conforming const... yes
checking for off_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking whether byte ordering is bigendian... no
checking for in_addr_t... yes
checking for socklen_t... yes
checking for open as weak alias for _open... no
checking for strstr... yes
checking for fcntl... yes
checking for flock... yes
checking for sched_yield... yes
checking for pthread_cancel... yes
checking for setpriority... yes
checking for strtoull... yes
checking for strtouq... yes
checking for inet_aton... yes
checking for inet_pton... yes
checking for getifaddrs... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating ipcad.spec
config.status: creating config.h
Пробую собрать:
gcc -DIPCAD_VERSION=\"3.7.3\" -DCONFIG_FILE=\"/usr/local/etc/ipcad.conf\" -DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE -DPSRC_pcap -DIFST_linux -g -O2 -I/usr/local/include -DHAVE_CONFIG_H -W -Wall -o main.o -c main.c
main.c: In function ‘sigalarm’:
main.c:45:2: warning: implicit declaration of function ‘signal’ [-Wimplicit-function-declaration]
main.c: In function ‘main’:
main.c:247:8: error: ‘SIGCHLD’ undeclared (first use in this function)
main.c:247:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:252:8: error: ‘SIGSEGV’ undeclared (first use in this function)
main.c:253:8: error: ‘SIGBUS’ undeclared (first use in this function)
main.c:261:13: error: ‘SIG_IGN’ undeclared (first use in this function)
main.c:264:9: error: ‘SIGALRM’ undeclared (first use in this function)
main.c:265:9: error: ‘SIGINT’ undeclared (first use in this function)
main.c:266:9: error: ‘SIGHUP’ undeclared (first use in this function)
main.c:267:9: error: ‘SIGQUIT’ undeclared (first use in this function)
main.c:268:9: error: ‘SIGPIPE’ undeclared (first use in this function)
main.c:269:9: error: ‘SIGTERM’ undeclared (first use in this function)
main.c:270:9: error: ‘SIGTTIN’ undeclared (first use in this function)
main.c:272:2: warning: implicit declaration of function ‘siginterrupt’ [-Wimplicit-function-declaration]
main.c: In function ‘block_certain_signals’:
main.c:332:2: warning: implicit declaration of function ‘sigemptyset’ [-Wimplicit-function-declaration]
main.c:333:2: warning: implicit declaration of function ‘sigaddset’ [-Wimplicit-function-declaration]
main.c:333:18: error: ‘SIGINT’ undeclared (first use in this function)
main.c:334:18: error: ‘SIGHUP’ undeclared (first use in this function)
main.c:335:18: error: ‘SIGQUIT’ undeclared (first use in this function)
main.c:336:18: error: ‘SIGTERM’ undeclared (first use in this function)
main.c:337:2: warning: implicit declaration of function ‘sigprocmask’ [-Wimplicit-function-declaration]
main.c:337:21: error: ‘SIG_BLOCK’ undeclared (first use in this function)
main.c: In function ‘terminate_threads’:
main.c:410:3: warning: implicit declaration of function ‘pthread_kill’ [-Wimplicit-function-declaration]
main.c:410:26: error: ‘SIGALRM’ undeclared (first use in this function)
main.c: In function ‘block_certain_signals’:
main.c:338:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [main.o] Ошибка 1
И не пойму, что за ошибки выдает. Что делаю не так?
