knockd installieren

datatek

New Member
I versuche knockd zu installieren mit knock-0.5.tar.gz

Das ./configure klappt wunderbar, aber bei make bricht es ab mit:

Code:
    [root@testbox knock-0.5]# make
    gcc -g -O2 -g -Wall -pedantic -fno-exceptions -D_GNU_SOURCE -I. -o src/knockd.o -c src/knockd.c
    src/knockd.c:134: error: âPATH_MAXâ undeclared here (not in a function)
    src/knockd.c: In function âparseconfigâ:
    src/knockd.c:438: warning: unused variable âlineâ
    src/knockd.c: In function âget_next_one_time_sequenceâ:
    src/knockd.c:695: warning: unused variable âlineâ
    src/knockd.c: In function âsniffâ:
    src/knockd.c:1386: warning: unused variable âparsed_stop_cmdâ
    src/knockd.c:1385: warning: unused variable âparsed_start_cmdâ
    make: *** [src/knockd.o] Error 1


Ich habe dann versucht es mit dem knock-0.5-4.src.rpm zu installieren.

Hier bricht er auch ab mit:

Code:
    [root@testbox knocksrcrpm]# rpmbuild --rebuild knock-0.5-4.src.rpm
    Installing knock-0.5-4.src.rpm
    Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.v4qqY5
    + umask 022
    + cd /root/rpmbuild/BUILD
    + cd /root/rpmbuild/BUILD
    + rm -rf knock-0.5
    + /usr/bin/gzip -dc /root/rpmbuild/SOURCES/knock-0.5.tar.gz
    + /bin/tar -xf -
    + STATUS=0
    + '[' 0 -ne 0 ']'
    + cd knock-0.5
    + /bin/chmod -Rf a+rX,u+w,g-w,o-w .
    + echo 'Patch #0 (knock-0.5-syslog.patch):'
    Patch #0 (knock-0.5-syslog.patch):
    + /bin/cat /root/rpmbuild/SOURCES/knock-0.5-syslog.patch
    + /usr/bin/patch -s -p1 -b --suffix .syslog --fuzz=0
    + exit 0
    Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.k0hwSJ
    + umask 022
    + cd /root/rpmbuild/BUILD
    + cd knock-0.5
    + export CFLAGS=-I/usr/include/pcap
    + CFLAGS=-I/usr/include/pcap
    + CFLAGS=-I/usr/include/pcap
    + export CFLAGS
    + CXXFLAGS='-O2 -g -march=i386 -mtune=i686'
    + export CXXFLAGS
    + FFLAGS='-O2 -g -march=i386 -mtune=i686'
    + export FFLAGS
    + ./configure --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=i386-redhat-linux --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
    checking for i686-pc-linux-gnu-gcc... no
    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 i686-pc-linux-gnu-g++... no
    checking for i686-pc-linux-gnu-c++... no
    checking for i686-pc-linux-gnu-gpp... no
    checking for i686-pc-linux-gnu-aCC... no
    checking for i686-pc-linux-gnu-CC... no
    checking for i686-pc-linux-gnu-cxx... no
    checking for i686-pc-linux-gnu-cc++... no
    checking for i686-pc-linux-gnu-cl... no
    checking for i686-pc-linux-gnu-FCC... no
    checking for i686-pc-linux-gnu-KCC... no
    checking for i686-pc-linux-gnu-RCC... no
    checking for i686-pc-linux-gnu-xlC_r... no
    checking for i686-pc-linux-gnu-xlC... no
    checking for g++... no
    checking for c++... no
    checking for gpp... no
    checking for aCC... no
    checking for CC... no
    checking for cxx... no
    checking for cc++... no
    checking for cl... no
    checking for FCC... no
    checking for KCC... no
    checking for RCC... no
    checking for xlC_r... no
    checking for xlC... no
    checking whether we are using the GNU C++ compiler... no
    checking whether g++ accepts -g... no
    checking for a BSD-compatible install... /usr/bin/install -c
    checking for pcap_open_live in -lpcap... 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/wait.h that is POSIX.1 compatible... 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 arpa/inet.h usability... yes
    checking arpa/inet.h presence... yes
    checking for arpa/inet.h... yes
    checking pcap.h usability... yes
    checking pcap.h presence... yes
    checking for pcap.h... yes
    checking netdb.h usability... yes
    checking netdb.h presence... yes
    checking for netdb.h... yes
    checking netinet/in.h usability... yes
    checking netinet/in.h presence... yes
    checking for netinet/in.h... yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking sys/socket.h usability... yes
    checking sys/socket.h presence... yes
    checking for sys/socket.h... yes
    checking syslog.h usability... yes
    checking syslog.h presence... yes
    checking for syslog.h... yes
    checking for unistd.h... (cached) yes
    checking for an ANSI C-conforming const... yes
    checking for size_t... yes
    checking whether struct tm is in sys/time.h or time.h... time.h
    checking for pid_t... yes
    checking for unistd.h... (cached) yes
    checking vfork.h usability... no
    checking vfork.h presence... no
    checking for vfork.h... no
    checking for fork... yes
    checking for vfork... yes
    checking for working fork... yes
    checking for working vfork... (cached) yes
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible malloc... yes
    checking return type of signal handlers... void
    checking for vprintf... yes
    checking for _doprnt... no
    checking for inet_ntoa... yes
    checking for memmove... yes
    checking for strcasecmp... yes
    checking for strdup... yes
    checking for strstr... yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating config.h
    + /usr/bin/make
    gcc -O2 -g -march=i386 -mtune=i686 -I/usr/include/pcap -g -Wall -pedantic -fno-exceptions -D_GNU_SOURCE -I. -o src/knockd.o -c src/knockd.c
    src/knockd.c:134: error: âPATH_MAXâ undeclared here (not in a function)
    src/knockd.c: In function âparseconfigâ:
    src/knockd.c:438: warning: unused variable âlineâ
    src/knockd.c: In function âget_next_one_time_sequenceâ:
    src/knockd.c:695: warning: unused variable âlineâ
    src/knockd.c: In function âsniffâ:
    src/knockd.c:1386: warning: unused variable âparsed_stop_cmdâ
    src/knockd.c:1385: warning: unused variable âparsed_start_cmdâ
    make: *** [src/knockd.o] Error 1
    error: Bad exit status from /var/tmp/rpm-tmp.k0hwSJ (%build)


    RPM build errors:
        Bad exit status from /var/tmp/rpm-tmp.k0hwSJ (%build)

Das ganze unter Fedora 11.

Ich bitte um Hilfe :(
 
PATH_MAX sollte eigentlich in limits.h definiert sein.

Schau mal in src/knockd.c nach, ob dort ein "#include <limits.h>" steht. Falls nein, solltest Du das recht weit oben (außerhalb von irgendwelchen #ifdef / #endif-Direktiven) eintragen. Falls ja, kann es evtl. helfen, direkt nach der entsprechenden include-Zeile ein "#include <linux/limits.h>" einzufügen).
 
Back
Top