Browse Source

Move upstream change to d/patches.

upstream-debian/master
Gabriele Giacone 9 years ago
parent
commit
d078a2f6a9
  1. 36
      debian/patches/31_killall5_hurd.patch
  2. 1
      debian/patches/series
  3. 15
      src/killall5.c

36
debian/patches/31_killall5_hurd.patch

@ -0,0 +1,36 @@
Author: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Mon Jul 8 15:56:46 2013 +0200
Description: killall5.c: Use sysconf(_SC_SYMLOOP_MAX) instead of MAXSYMLINKS.
If sysconf returns an error, fall back to MAXSYMLINKS on platforms that
define it. Fixes build on Hurd.
--- a/src/killall5.c
+++ b/src/killall5.c
@@ -367,13 +367,26 @@ out:
}
/*
+ * Get the maximal number of symlinks to follow.
+ */
+static int maxsymlinks(void)
+{
+ int v = sysconf(_SC_SYMLOOP_MAX);
+#ifdef MAXSYMLINKS
+ if (v == -1)
+ return MAXSYMLINKS;
+#endif
+ return v;
+}
+
+/*
* Check path is located on a network based partition.
*/
int check4nfs(const char * path, char * real)
{
char buf[PATH_MAX+1];
const char *curr;
- int deep = MAXSYMLINKS;
+ int deep = maxsymlinks();
if (!nlist) return 0;

1
debian/patches/series

@ -6,6 +6,7 @@
11_run_nologin.patch
20_init_freebsd_vswtc.patch
30_killall5_hurd.patch
31_killall5_hurd.patch
40_multiarch_libcrypt.patch
63_init_keep_utf8_ttyflag.patch
64_init_selinux_enabled.patch

15
src/killall5.c

@ -366,19 +366,6 @@ out:
return 0;
}
/*
* Get the maximal number of symlinks to follow.
*/
static int maxsymlinks(void)
{
int v = sysconf(_SC_SYMLOOP_MAX);
#ifdef MAXSYMLINKS
if (v == -1)
return MAXSYMLINKS;
#endif
return v;
}
/*
* Check path is located on a network based partition.
*/
@ -386,7 +373,7 @@ int check4nfs(const char * path, char * real)
{
char buf[PATH_MAX+1];
const char *curr;
int deep = maxsymlinks();
int deep = MAXSYMLINKS;
if (!nlist) return 0;

Loading…
Cancel
Save