samba-bugs at samba.org
2011-Apr-01 17:35 UTC
[Bug 8053] New: Older C compilers don't allow in-line declarations flist.c:1653
https://bugzilla.samba.org/show_bug.cgi?id=8053
Summary: Older C compilers don't allow in-line declarations
flist.c:1653
Product: rsync
Version: 3.0.8
Platform: All
OS/Version: FreeBSD
Status: NEW
Severity: minor
Priority: P5
Component: core
AssignedTo: wayned at samba.org
ReportedBy: kevin.braunsdorf at gmail.com
QAContact: rsync-qa at samba.org
The build for rsync fails on FreeBSD with older gcc versions due to
a syntax error. This
A pure C compiler doesn't allow C++ style in-line declarations, we need
a curly brace to scope the declaration of name_len here:
--- flist.c Mon Feb 21 12:20:58 2011
+++ ../flist.c Fri Apr 1 12:33:18 2011
@@ -1651,4 +1651,5 @@
|| (dname[1] == '.' && dname[2] ==
'\0')))
continue;
+ {
unsigned name_len = strlcpy(p, dname, remainder);
if (name_len >= remainder) {
@@ -1671,4 +1672,5 @@
send_file_name(f, flist, fbuf, NULL, flags, filter_level);
+ }
}
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
samba-bugs at samba.org
2011-Apr-10 22:11 UTC
[Bug 8053] Older C compilers don't allow in-line declarations flist.c:1653
https://bugzilla.samba.org/show_bug.cgi?id=8053 --- Comment #1 from Wayne Davison <wayned at samba.org> 2011-04-10 22:11:30 UTC --- Created attachment 6397 --> https://bugzilla.samba.org/attachment.cgi?id=6397 Move the var declaration up -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
samba-bugs at samba.org
2011-Apr-10 22:12 UTC
[Bug 8053] Older C compilers don't allow in-line declarations flist.c:1653
https://bugzilla.samba.org/show_bug.cgi?id=8053
Wayne Davison <wayned at samba.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Version|3.0.8 |3.1.0
Resolution| |FIXED
--- Comment #2 from Wayne Davison <wayned at samba.org> 2011-04-10
22:12:32 UTC ---
I checked-in a fix for this a little while ago on the git master branch.
Attached is a patch for 3.0.8.
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
samba-bugs at samba.org
2011-Apr-10 22:15 UTC
[Bug 8053] Older C compilers don't allow in-line declarations flist.c:1653
https://bugzilla.samba.org/show_bug.cgi?id=8053
Wayne Davison <wayned at samba.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |grarpamp at gmail.com
--- Comment #3 from Wayne Davison <wayned at samba.org> 2011-04-10
22:15:35 UTC ---
*** Bug 8073 has been marked as a duplicate of this bug. ***
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Reasonably Related Threads
- windows compilation problem
- [patch] add "--ignore" option
- [Bug 8073] New: Regress: 3.0.8 cannot compile on freebsd
- DO NOT REPLY [Bug 4899] New: When a mounted dir cannot be visited, rsync will halt there and the shell is halted, even "ctrl -c" can't quit it.
- readdir() and read() errors ignored