From 87530b9290c2eacfcdc08c86e41f900016e71fc0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 5 May 2024 19:30:18 +0200 Subject: Adding debian version 2:3.87.1-1. Signed-off-by: Daniel Baumann --- debian/patches/38_hurd.patch | 59 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 debian/patches/38_hurd.patch (limited to 'debian/patches/38_hurd.patch') diff --git a/debian/patches/38_hurd.patch b/debian/patches/38_hurd.patch new file mode 100644 index 0000000..91b5442 --- /dev/null +++ b/debian/patches/38_hurd.patch @@ -0,0 +1,59 @@ +## 38_hurd.patch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix FTBFS on Hurd because of MAXPATHLEN + +Index: nss/nss/cmd/shlibsign/shlibsign.c +=================================================================== +--- nss.orig/nss/cmd/shlibsign/shlibsign.c ++++ nss/nss/cmd/shlibsign/shlibsign.c +@@ -725,7 +725,6 @@ main(int argc, char **argv) + #ifdef USES_LINKS + int ret; + struct stat stat_buf; +- char link_buf[MAXPATHLEN + 1]; + char *link_file = NULL; + #endif + +@@ -1068,10 +1067,22 @@ main(int argc, char **argv) + } + if (S_ISLNK(stat_buf.st_mode)) { + char *dirpath, *dirend; +- ret = readlink(input_file, link_buf, sizeof(link_buf) - 1); +- if (ret < 0) { +- perror(input_file); +- goto cleanup; ++ char *link_buf = NULL; ++ size_t size = 64; ++ while (1) { ++ link_buf = realloc(link_buf, size); ++ if (!link_buf) { ++ perror(input_file); ++ goto cleanup; ++ } ++ ret = readlink(input_file, link_buf, size - 1); ++ if (ret < 0) { ++ perror(input_file); ++ goto cleanup; ++ } ++ if (ret < size - 1) ++ break; ++ size *= 2; + } + link_buf[ret] = 0; + link_file = mkoutput(input_file); +Index: nss/nss/lib/freebl/unix_rand.c +=================================================================== +--- nss.orig/nss/lib/freebl/unix_rand.c ++++ nss/nss/lib/freebl/unix_rand.c +@@ -843,6 +843,10 @@ RNG_FileForRNG(const char *fileName) + #define _POSIX_PTHREAD_SEMANTICS + #include + ++#ifndef PATH_MAX ++#define PATH_MAX 1024 ++#endif ++ + PRBool + ReadFileOK(char *dir, char *file) + { -- cgit v1.2.3