ports/50484: Lots of warnings when compiling hping
root at tomten.homelinux.net
root at tomten.homelinux.net
Mon Mar 31 15:50:11 UTC 2003
>Number: 50484
>Category: ports
>Synopsis: Lots of warnings when compiling hping
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Mar 31 07:50:08 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: root
>Release: FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD killerqueen.tomten.homelinux.net 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Mar 19 19:58:30 CET 2003 root at killerqueen.tomten.homelinux.net:/usr/obj/usr/src/sys/KERNEL8 i386
>Description:
Lots of compiler warnings generated when compiling the hping port.
===> Building for hping-2.0.0r2_2,1
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP main.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP getifname.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP getlhs.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP linux_sockpacket.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP parseoptions.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP datafiller.c
datafiller.c: In function `datafiller':
datafiller.c:67: warning: implicit declaration of function `exit'
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP datahandler.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP gethostname.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP binding.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP getusec.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP opensockraw.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP logicmp.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP waitpacket.c
waitpacket.c: In function `wait_packet':
waitpacket.c:46: warning: implicit declaration of function `exit'
waitpacket.c: In function `log_icmp_ts':
waitpacket.c:183: warning: long unsigned int format, __uint32_t arg (arg 2)
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP resolve.c
resolve.c: In function `resolve':
resolve.c:37: warning: implicit declaration of function `exit'
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP sendip.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP sendicmp.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP sendudp.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP sendtcp.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP cksum.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP statistics.c
statistics.c: In function `print_statistics':
statistics.c:46: warning: implicit declaration of function `exit'
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP usage.c
usage.c: In function `show_usage':
usage.c:94: warning: implicit declaration of function `exit'
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP version.c
version.c: In function `show_version':
version.c:24: warning: implicit declaration of function `exit'
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP antigetopt.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP sockopt.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP listen.c
listen.c: In function `listenmain':
listen.c:39: warning: implicit declaration of function `exit'
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP sendhcmp.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP memstr.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP rtt.c
rtt.c: In function `rtt':
rtt.c:75: warning: long int format, time_t arg (arg 2)
rtt.c:76: warning: long int format, time_t arg (arg 2)
rtt.c:78: warning: long int format, time_t arg (arg 2)
rtt.c:79: warning: long int format, time_t arg (arg 2)
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP relid.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP sendip_handler.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP libpcap_stuff.c
libpcap_stuff.c: In function `pcap_recv':
libpcap_stuff.c:70: warning: implicit declaration of function `memcpy'
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP memlockall.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP memunlockall.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP memlock.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP memunlock.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP ip_opt_build.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP display_ipopt.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP sendrawip.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP signal.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP send.c
cc -c -Wall -O -pipe -march=pentium2 -g -DFORCE_LIBPCAP strlcpy.c
cc -o hping2 -Wall -O -pipe -march=pentium2 -g main.o getifname.o getlhs.o linux_sockpacket.o parseoptions.o datafiller.o d
atahandler.o gethostname.o binding.o getusec.o opensockraw.o logicmp.o waitpacket.o resolve.o sendip.o sendicmp.o sendudp.o
sendtcp.o cksum.o statistics.o usage.o version.o antigetopt.o sockopt.o listen.o sendhcmp.o memstr.o rtt.o relid.o sendip_ha
ndler.o libpcap_stuff.o memlockall.o memunlockall.o memlock.o memunlock.o ip_opt_build.o display_ipopt.o sendrawip.o signal.
o send.o strlcpy.o -lpcap
./hping2 -v
hping version 2.0.0 release candidate 2 (Wed Aug 15 02:59:30 CEST 2001)
libpcap based binary
use `make strip' to strip hping2 binary
use `make install' to install hping2
>How-To-Repeat:
Build the port on a FreeBSD 5.0 system.
>Fix:
--- diff.log begins here ---
*** datafiller.c.org Sun Mar 30 13:18:24 2003
--- datafiller.c Sun Mar 30 13:20:22 2003
***************
*** 14,19 ****
--- 14,20 ----
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h> /* memset */
+ #include <stdlib.h>
#include "hping2.h"
#include "globals.h"
*** libpcap_stuff.c.org Sun Mar 30 13:19:42 2003
--- libpcap_stuff.c Sun Mar 30 13:25:51 2003
***************
*** 17,22 ****
--- 17,23 ----
#include <sys/ioctl.h>
#include <pcap.h>
#include <net/bpf.h>
+ #include <string.h>
#include "globals.h"
*** listen.c.org Sun Mar 30 13:19:24 2003
--- listen.c Sun Mar 30 13:24:31 2003
***************
*** 14,19 ****
--- 14,20 ----
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
+ #include <stdlib.h>
#include "hping2.h" /* hping2.h includes hcmp.h */
#include "globals.h"
*** resolve.c.org Sun Mar 30 13:18:51 2003
--- resolve.c Sun Mar 30 13:22:02 2003
***************
*** 15,20 ****
--- 15,21 ----
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+ #include <stdlib.h>
void resolve (struct sockaddr * addr, char *hostname)
{
*** rtt.c.org Sun Mar 30 13:19:33 2003
--- rtt.c Mon Mar 31 17:32:40 2003
***************
*** 72,82 ****
printf("\n\nSANITY CHECK in rtt.c FAILED!\n");
printf("- seqnum = %d\n", *seqp);
printf("- status = %d\n", status);
! printf("- get_usec() = %ld\n", get_usec());
! printf("- delaytable.usec = %ld\n", delaytable[tablepos].usec);
! printf("- usec_delay = %ld\n", usec_delay);
! printf("- time(NULL) = %ld\n", time(NULL));
! printf("- delaytable.sec = %ld\n", delaytable[tablepos].sec);
printf("- sec_delay = %ld\n", sec_delay);
printf("- ms_delay = %f\n", *ms_delay);
printf("END SANITY CHECK REPORT\n\n");
--- 72,83 ----
printf("\n\nSANITY CHECK in rtt.c FAILED!\n");
printf("- seqnum = %d\n", *seqp);
printf("- status = %d\n", status);
! /* time_t is __int32_t on i386 FreeBSD */
! printf("- get_usec() = %ld\n", (long)get_usec());
! printf("- delaytable.usec = %ld\n", (long)delaytable[tablepos].usec);
! printf("- usec_delay = %ld\n", (long)usec_delay);
! printf("- time(NULL) = %ld\n", (long)time(NULL));
! printf("- delaytable.sec = %ld\n", (long)delaytable[tablepos].sec);
printf("- sec_delay = %ld\n", sec_delay);
printf("- ms_delay = %f\n", *ms_delay);
printf("END SANITY CHECK REPORT\n\n");
*** statistics.c.org Sun Mar 30 13:19:02 2003
--- statistics.c Sun Mar 30 13:22:18 2003
***************
*** 9,14 ****
--- 9,15 ----
*/
#include <stdio.h>
+ #include <stdlib.h>
#include "hping2.h"
#include "globals.h"
*** version.c.org Sun Mar 30 13:19:17 2003
--- version.c Sun Mar 30 13:23:17 2003
***************
*** 9,14 ****
--- 9,15 ----
*/
#include <stdio.h>
+ #include <stdlib.h>
#include "release.h"
#include "hping2.h"
*** waitpacket.c.org Sun Mar 30 13:18:32 2003
--- waitpacket.c Sun Mar 30 20:28:13 2003
***************
*** 13,18 ****
--- 13,19 ----
#include <time.h>
#include <ctype.h>
#include <unistd.h>
+ #include <stdlib.h>
#include "hping2.h"
#include "globals.h"
***************
*** 179,185 ****
(unsigned int) ntohl(icmp_tstamp.orig),
(unsigned int) ntohl(icmp_tstamp.recv),
(unsigned int) ntohl(icmp_tstamp.tran));
! printf("ICMP timestamp RTT tsrtt=%lu\n\n",
(get_midnight_ut_ms() - ntohl(icmp_tstamp.orig)));
}
--- 180,186 ----
(unsigned int) ntohl(icmp_tstamp.orig),
(unsigned int) ntohl(icmp_tstamp.recv),
(unsigned int) ntohl(icmp_tstamp.tran));
! printf("ICMP timestamp RTT tsrtt=%u\n\n",
(get_midnight_ut_ms() - ntohl(icmp_tstamp.orig)));
}
--- diff.log ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list