tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[PATCH] <arpa/inet.h> for mkubootimage



Hi!

This is, for now, the last patch to resurrect (I think: all)
previously working ports when building on a very recent Linux (GNU
libc + GCC) host:

[bld tls 2024-10-19 08:11:51] echo '#  ' "compile " mkubootimage/mkubootimage.lo
[bld tls 2024-10-19 08:11:51] + echo #   compile  mkubootimage/mkubootimage.lo
[bld tls 2024-10-19 08:11:51] #   compile  mkubootimage/mkubootimage.lo
[bld tls 2024-10-19 08:11:51] cc -O   -I/var/lib/laminar/run/netbsd-evbmips-mips64eb/47/NetBSD-src/tools/mkubootimage -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/var/lib/laminar/run/netbsd-evbmips-mips64eb/47/tools-evbmips-mips64eb/include/compat -I/var/lib/laminar/run/netbsd-evbmips-mips64eb/47/NetBSD-src/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -c -o mkubootimage.lo.o    /var/lib/laminar/run/netbsd-evbmips-mips64eb/47/NetBSD-src/tools/mkubootimage/../../usr.bin/mkubootimage/mkubootimage.c
[bld tls 2024-10-19 08:11:51] + cc -O -I/var/lib/laminar/run/netbsd-evbmips-mips64eb/47/NetBSD-src/tools/mkubootimage -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/var/lib/laminar/run/netbsd-evbmips-mips64eb/47/tools-evbmips-mips64eb/include/compat -I/var/lib/laminar/run/netbsd-evbmips-mips64eb/47/NetBSD-src/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -c -o mkubootimage.lo.o /var/lib/laminar/run/netbsd-evbmips-mips64eb/47/NetBSD-src/tools/mkubootimage/../../usr.bin/mkubootimage/mkubootimage.c
[bld tls 2024-10-19 08:11:51] /var/lib/laminar/run/netbsd-evbmips-mips64eb/47/NetBSD-src/tools/mkubootimage/../../usr.bin/mkubootimage/mkubootimage.c: In function 'dump_header_uimg':
[bld tls 2024-10-19 08:11:51] /var/lib/laminar/run/netbsd-evbmips-mips64eb/47/NetBSD-src/tools/mkubootimage/../../usr.bin/mkubootimage/mkubootimage.c:279:21: error: implicit declaration of function 'ntohl' [-Wimplicit-function-declaration]
[bld tls 2024-10-19 08:11:51]   279 |         time_t tm = ntohl(hdr->ih_time);
[bld tls 2024-10-19 08:11:51]       |                     ^~~~~
[bld tls 2024-10-19 08:11:51] /var/lib/laminar/run/netbsd-evbmips-mips64eb/47/NetBSD-src/tools/mkubootimage/../../usr.bin/mkubootimage/mkubootimage.c: In function 'generate_header_uimg':
[bld tls 2024-10-19 08:11:51] /var/lib/laminar/run/netbsd-evbmips-mips64eb/47/NetBSD-src/tools/mkubootimage/../../usr.bin/mkubootimage/mkubootimage.c:327:31: error: implicit declaration of function 'htonl' [-Wimplicit-function-declaration]
[bld tls 2024-10-19 08:11:51]   327 |                 size_buf[0] = htonl(st.st_size);
[bld tls 2024-10-19 08:11:51]       |                               ^~~~~
[bld tls 2024-10-19 08:11:51] 
[bld tls 2024-10-19 08:11:51] *** Failed target:  mkubootimage.lo
[bld tls 2024-10-19 08:11:51] *** Failed command: cc -O -I/var/lib/laminar/run/netbsd-evbmips-mips64eb/47/NetBSD-src/tools/mkubootimage -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/var/lib/laminar/run/netbsd-evbmips-mips64eb/47/tools-evbmips-mips64eb/include/compat -I/var/lib/laminar/run/netbsd-evbmips-mips64eb/47/NetBSD-src/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -c -o mkubootimage.lo.o /var/lib/laminar/run/netbsd-evbmips-mips64eb/47/NetBSD-src/tools/mkubootimage/../../usr.bin/mkubootimage/mkubootimage.c
[bld tls 2024-10-19 08:11:51] *** Error code 1
[bld tls 2024-10-19 08:11:51] 
[bld tls 2024-10-19 08:11:51] Stop.
[bld tls 2024-10-19 08:11:51] nbmake[3]: stopped making "realall" in /var/lib/laminar/run/netbsd-evbmips-mips64eb/47/NetBSD-src/tools/mkubootimage



diff --git a/usr.bin/mkubootimage/mkubootimage.c b/usr.bin/mkubootimage/mkubootimage.c
index bb027c3ea513..2e38b5f96bfd 100644
--- a/usr.bin/mkubootimage/mkubootimage.c
+++ b/usr.bin/mkubootimage/mkubootimage.c
@@ -32,6 +32,7 @@
 #include <sys/cdefs.h>
 __RCSID("$NetBSD: mkubootimage.c,v 1.33 2024/05/21 04:01:26 gutteridge Exp $");
 
+#include <arpa/inet.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <sys/endian.h>


Thanks,
  Jan-Benedict

-- 

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index