Source: krb5
Version: 1.17-6
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd
Control: found -1 krb5/1.17-1

Hi,

krb5 fails to build on hurd-i386 [1].

The issue is a new occurrence of MAXHOSTNAMELEN in the krb5 library;
attached there is an amended 0001-Debian-HURD-compatibility.patch that
moves the fallback MAXHOSTNAMELEN define to src/include/k5-int.h,
removing the other two definitions in krb5 library sources.

[1] 
https://buildd.debian.org/status/fetch.php?pkg=krb5&arch=hurd-i386&ver=1.17-6&stamp=1564688099&raw=0

Thanks,
-- 
Pino
From: Sam Hartman <hartm...@debian.org>
Date: Mon, 26 Dec 2011 18:05:13 -0500
Subject: Debian: HURD compatibility

HURD has no MAXPATHLEN or MAXHOSTNAMELEN.

Patch-Category: debian-local
---
 src/clients/ksu/ksu.h                       | 4 ++++
 src/include/k5-int.h                        | 3 +++
 src/kadmin/ktutil/ktutil_funcs.c            | 4 ++++
 src/kprop/kprop_util.c                      | 4 ++++
 src/lib/gssapi/spnego/spnego_mech.c         | 3 +++
 src/lib/krb5/os/sn2princ.c                  | 4 ++++
 src/plugins/kdb/db2/libdb2/include/db-int.h | 4 ++++
 src/tests/resolve/resolve.c                 | 4 ++++
 8 files changed, 30 insertions(+)

--- a/src/clients/ksu/ksu.h
+++ b/src/clients/ksu/ksu.h
@@ -56,6 +56,10 @@
 #define MAX_CMD 2048 /* this is temp, should use realloc instead,
                         as done in most of the code */
 
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+#endif
+
 
 extern int optind;
 extern char * optarg;
--- a/src/include/k5-int.h
+++ b/src/include/k5-int.h
@@ -589,6 +589,12 @@
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>                  /* MAXPATHLEN */
 #endif
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+#endif
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 256
+#endif
 
 #ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>                   /* prototypes for file-related
--- a/src/kadmin/ktutil/ktutil_funcs.c
+++ b/src/kadmin/ktutil/ktutil_funcs.c
@@ -34,6 +34,10 @@
 #include <string.h>
 #include <ctype.h>
 
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+#endif
+
 /*
  * Free a kt_list
  */
--- a/src/kprop/kprop_util.c
+++ b/src/kprop/kprop_util.c
@@ -32,6 +32,10 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 256
+#endif
+
 /*
  * Convert an IPv4 or IPv6 socket address to a newly allocated krb5_address.
  * There is similar code elsewhere in the tree, so this should possibly become
--- a/src/plugins/kdb/db2/libdb2/include/db-int.h
+++ b/src/plugins/kdb/db2/libdb2/include/db-int.h
@@ -280,4 +280,8 @@
 #ifndef O_BINARY
 #define O_BINARY       0               /* Needed for Win32 compiles */
 #endif
+
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 4096
+#endif
 #endif /* _DB_INT_H_ */
--- a/src/tests/resolve/resolve.c
+++ b/src/tests/resolve/resolve.c
@@ -73,6 +73,10 @@
 #include <netinet/in.h>
 #include <netdb.h>
 
+#ifndef MAXHOSTNAMELEN
+# define MAXHOSTNAMELEN 256
+#endif
+
 int
 main(argc, argv)
     int argc;

Reply via email to