Fix build failures if MAXHOSTNAMELEN or MAXPATHLEN is not defined

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2017-10-31 15:59:19 +01:00
parent 6bcc2c0f6c
commit f1fdda4542
2 changed files with 6 additions and 0 deletions

View File

@ -709,6 +709,9 @@ packet_ok(int read_len, len_and_sockaddr *from_lsa,
# if ENABLE_FEATURE_TRACEROUTE_VERBOSE # if ENABLE_FEATURE_TRACEROUTE_VERBOSE
if (verbose) { if (verbose) {
# ifndef MAXHOSTNAMELEN
# define MAXHOSTNAMELEN 80
# endif
unsigned char *p; unsigned char *p;
char pa1[MAXHOSTNAMELEN]; char pa1[MAXHOSTNAMELEN];
char pa2[MAXHOSTNAMELEN]; char pa2[MAXHOSTNAMELEN];

View File

@ -709,6 +709,9 @@ sync_disks(void)
static void static void
xbsd_write_bootstrap(void) xbsd_write_bootstrap(void)
{ {
#ifndef MAXPATHLEN
# define MAXPATHLEN 1024
#endif
char path[MAXPATHLEN]; char path[MAXPATHLEN];
const char *bootdir = BSD_LINUX_BOOTDIR; const char *bootdir = BSD_LINUX_BOOTDIR;
const char *dkbasename; const char *dkbasename;