Skip Menu |

This queue is for tickets about the File-RsyncP CPAN distribution.

Report information
The Basics
Id: 94323
Status: resolved
Priority: 0/
Queue: File-RsyncP

People
Owner: cbarratt [...] users.sourceforge.net
Requestors: ryandesign [...] macports.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.72



Subject: flist.c:729:8: error: expected parameter declarator (strlcpy)
Date: Sun, 30 Mar 2014 18:52:42 -0500
To: bug-File-RsyncP [...] rt.cpan.org
From: Ryan Schmidt <ryandesign [...] macports.org>
Hello, I’m a developer with the MacPorts package management system, and I cannot build File::RsyncP 0.70 on OS X Mavericks v10.9.2. The first error is: flist.c:729:8: error: expected parameter declarator size_t strlcpy(char *d, const char *s, size_t bufsize) ^ /usr/include/secure/_string.h:105:44: note: expanded from macro 'strlcpy' __builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest)) -- ^ /usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL' # define _USE_FORTIFY_LEVEL 2 ^ I’m attach the full log, from MacPorts. The operating system is: $ sw_vers ProductName: Mac OS X ProductVersion: 10.9.2 BuildVersion: 13C64 The perl version is: $ perl5.16 -v This is perl 5, version 16, subversion 1 (v5.16.1) built for darwin-thread-multi-2level Copyright 1987-2012, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. The compiler is: $ clang -v Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn) Target: x86_64-apple-darwin13.1.0 Thread model: posix
Download main.log
application/octet-stream 32.1k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #94323] AutoReply: flist.c:729:8: error: expected parameter declarator (strlcpy)
Date: Sun, 30 Mar 2014 19:07:06 -0500
To: bug-File-RsyncP [...] rt.cpan.org
From: Ryan Schmidt <ryandesign [...] macports.org>
The problem seems to be that OS X Mavericks defines strlcpy (as a macro) and File::RsyncP is trying to define it too. File::RsyncP shouldn’t define it if the OS already provides it. You’re already checking for a system-provided strlcpy in your configure checks, and making use of that in rsync.h when deciding whether or not to define the forward declaration of the function, but have not done so in flist.c where the function is actually defined. Doing so there as well fixes the problem for me. Here is the patch I committed to MacPorts to do this: https://trac.macports.org/browser/trunk/dports/perl/p5-file-rsyncp/files/patch-FileList.flist.c.diff?rev=118332
Fixed in 0.72.