Fix build failures if MAXHOSTNAMELEN or MAXPATHLEN is not defined
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 31 Oct 2017 14:59:19 +0000 (15:59 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 31 Oct 2017 14:59:19 +0000 (15:59 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/traceroute.c
util-linux/fdisk_osf.c

index 6dcbc2faad39ca82387ebb3db4b7092f60d42467..a027b928a438dfbe3cd2129e07728b3cae3a672d 100644 (file)
@@ -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];
index 1141b7801d6ea91e683e5599824f1b99d242ffd8..1328c1fcdcf374b9ec64eb15d263b433fc8c51dc 100644 (file)
@@ -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;