[git commit] Fix build failures if MAXHOSTNAMELEN or MAXPATHLEN is not defined

Denys Vlasenko vda.linux at googlemail.com
Tue Oct 31 14:59:19 UTC 2017


commit: https://git.busybox.net/busybox/commit/?id=f1fdda45423a0133094840c0367aef1b026635d5
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/traceroute.c | 3 +++
 util-linux/fdisk_osf.c  | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/networking/traceroute.c b/networking/traceroute.c
index 6dcbc2f..a027b92 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -709,6 +709,9 @@ packet_ok(int read_len, len_and_sockaddr *from_lsa,
 
 # if ENABLE_FEATURE_TRACEROUTE_VERBOSE
 	if (verbose) {
+#  ifndef MAXHOSTNAMELEN
+#   define MAXHOSTNAMELEN 80
+#  endif
 		unsigned char *p;
 		char pa1[MAXHOSTNAMELEN];
 		char pa2[MAXHOSTNAMELEN];
diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c
index 1141b78..1328c1f 100644
--- a/util-linux/fdisk_osf.c
+++ b/util-linux/fdisk_osf.c
@@ -709,6 +709,9 @@ sync_disks(void)
 static void
 xbsd_write_bootstrap(void)
 {
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 1024
+#endif
 	char path[MAXPATHLEN];
 	const char *bootdir = BSD_LINUX_BOOTDIR;
 	const char *dkbasename;


More information about the busybox-cvs mailing list