Jim Gifford wrote:
Matt,
Which direction do we want to go in.
At the moment, I'm seriously considering dropping inetutils and
replacing it with just 'ping' from iputils. As you outlined, none of
these packages are maintained (to the degree we require at least), so
it's really picking the best of a bad bunch. inetutils' ping doesn't
work on sparc, I've not looked into netkit-base, so someone else will
have to comment on that. We've got iputils' ping working on a recent
LFS build on at least x86. If you can confirm that it also works on
Sparc et al. then I think this would be the most prudent way forward.
I've attached an updated patch, which is smaller than the last one I
sent, but still results in a clean compile.
Regards,
Matt.
diff -Naur iputils.orig/Makefile iputils/Makefile
--- iputils.orig/Makefile 2002-09-20 18:23:55.000000000 +0000
+++ iputils/Makefile 2005-08-23 19:13:35.985288424 +0000
@@ -1,5 +1,5 @@
# Path to parent kernel include files directory
-KERNEL_INCLUDE=/usr/src/linux/include
+KERNEL_INCLUDE=/usr/include
LIBC_INCLUDE=/usr/include
DEFINES=
@@ -8,14 +8,6 @@
LDLIBS=-lresolv
ADDLIB=
-ifeq ($(LIBC_INCLUDE)/socketbits.h,$(wildcard $(LIBC_INCLUDE)/socketbits.h))
- ifeq ($(LIBC_INCLUDE)/net/if_packet.h,$(wildcard $(LIBC_INCLUDE)/net/if_packet.h))
- GLIBCFIX=-Iinclude-glibc -include include-glibc/glibc-bugs.h
- endif
-endif
-ifeq ($(LIBC_INCLUDE)/bits/socket.h,$(wildcard $(LIBC_INCLUDE)/bits/socket.h))
- GLIBCFIX=-Iinclude-glibc -include include-glibc/glibc-bugs.h
-endif
#options if you compile with libc5, and without a bind>=4.9.4 libresolv
diff -Naur iputils.orig/ping.c iputils/ping.c
--- iputils.orig/ping.c 2002-09-20 15:08:11.000000000 +0000
+++ iputils/ping.c 2005-08-23 19:12:52.895839016 +0000
@@ -61,7 +61,8 @@
#include "ping_common.h"
#include <netinet/ip.h>
-#include <netinet/ip_icmp.h>
+#include <linux/icmp.h>
+#include <asm/byteorder.h>
#define MAXIPLEN 60
@@ -249,7 +250,7 @@
}
if (source.sin_addr.s_addr == 0) {
- int alen;
+ socklen_t alen;
struct sockaddr_in dst = whereto;
int probe_fd = socket(AF_INET, SOCK_DGRAM, 0);
diff -Naur iputils.orig/ping_common.c iputils/ping_common.c
--- iputils.orig/ping_common.c 2002-09-20 16:02:32.000000000 +0000
+++ iputils/ping_common.c 2005-08-23 19:08:45.619430744 +0000
@@ -67,7 +67,7 @@
int ii, jj, kk;
int pat[16];
char *cp;
- char *bp = outpack+8;
+ unsigned char *bp = outpack+8;
for (cp = patp; *cp; cp++) {
if (!isxdigit(*cp)) {
@@ -393,7 +393,7 @@
void sock_setbufs(int icmp_sock, int alloc)
{
int rcvbuf, hold;
- int tmplen = sizeof(hold);
+ socklen_t tmplen = sizeof(hold);
if (!sndbuf)
sndbuf = alloc;
@@ -464,7 +464,7 @@
if (!(options & F_PINGFILLED)) {
int i;
- char *p = outpack+8;
+ unsigned char *p = outpack+8;
/* Do not forget about case of small datalen,
* fill timestamp area too!
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page