From d2fa84de0cb1de4844cbb7f549d261456a0525c7 Mon Sep 17 00:00:00 2001 From: espie Date: Fri, 1 Jul 2011 10:24:53 +0000 Subject: [PATCH] move variable decl to beginning of block, should fix things for Nick Holland on sparc (if there's no more of these) no bin change, repair stuff that wouldn't build -> no bump --- net/rsync/patches/patch-flist_c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 net/rsync/patches/patch-flist_c diff --git a/net/rsync/patches/patch-flist_c b/net/rsync/patches/patch-flist_c new file mode 100644 index 00000000000..3ecb4baa87a --- /dev/null +++ b/net/rsync/patches/patch-flist_c @@ -0,0 +1,17 @@ +$OpenBSD: patch-flist_c,v 1.3 2011/07/01 10:24:53 espie Exp $ +--- flist.c.orig Fri Jul 1 12:18:23 2011 ++++ flist.c Fri Jul 1 12:19:48 2011 +@@ -1646,11 +1646,12 @@ static void send_directory(int f, struct file_list *fl + remainder = 0; + + for (errno = 0, di = readdir(d); di; errno = 0, di = readdir(d)) { ++ unsigned name_len; + char *dname = d_name(di); + if (dname[0] == '.' && (dname[1] == '\0' + || (dname[1] == '.' && dname[2] == '\0'))) + continue; +- unsigned name_len = strlcpy(p, dname, remainder); ++ name_len = strlcpy(p, dname, remainder); + if (name_len >= remainder) { + char save = fbuf[len]; + fbuf[len] = '\0';