On 06/04/2015 05:10 AM, Jonathan Perkin wrote: > We've hit this failure a few times in pkgsrc with packages which embed gnulib, > an example being the latest gnutls: > > ../../src/gl/stdio.h:1034:1: error: 'char* gets(char*)' conflicts with a > previous declaration > _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); > ^ > > > /opt/tools/gcc49/lib/gcc/x86_64-sun-solaris2.11/4.9.2/include-fixed/iso/stdio_iso.h:259:14: > note: previous declaration 'char* std::gets(char*)' > extern char *gets(char *); > ^
Uggh, so it is complaining about namespace issues. There may be a more elegant way to keep the warning on C++ (because you absolutely should not use std::gets() there, any more than gets() in C); but Bruno is the one that wrote all the magic for dealing with C++ namespaces, and I don't know how to tackle it. So I'm applying your patch, with a slight reduction in #if by consolidating lines. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
