This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [ANNOUNCEMENT] NEW: {libtirpc/libtirpc1/libtirpc-devel}-0.2.1-1
- From: Charles Wilson <cygwin at cwilson dot fastmail dot fm>
- To: cygwin at cygwin dot com
- Date: Fri, 20 Aug 2010 21:07:38 -0400
- Subject: Re: [ANNOUNCEMENT] NEW: {libtirpc/libtirpc1/libtirpc-devel}-0.2.1-1
- References: <201008191720.o7JHKGoE008398@mx1.redhat.com> <4C6F1F4A.2030901@redhat.com>
On 8/20/2010 8:35 PM, Eric Blake wrote:
> (Hmm - libvirt hasn't yet learned how to use tirpc on Linux, since
> rpc/rpc.h is directly in /usr/include on Fedora as part of
> glibc-headers; so I had to run 'make CFLAGS=-I/usr/include/tirpc
> LDFLAGS=-ltirpc', but that's an issue for the libvirt mailing list).
>
> Meanwhile, this warning is a bit annoying; and did not happen with the
> older sunrpc headers. Any chance you can silence them in a -2 release?
>
> In file included from ././remote/qemu_protocol.h:9,
> from remote/qemu_protocol.c:7:
> /usr/include/tirpc/rpc/rpc.h:84: warning: redundant redeclaration of
> 'bindresvport' [-Wredundant-decls]
> /usr/include/netinet/in.h:21: warning: previous declaration of
> 'bindresvport' was here
> /usr/include/tirpc/rpc/rpc.h:95: warning: redundant redeclaration of
> 'bindresvport_sa' [-Wredundant-decls]
> /usr/include/netinet/in.h:22: warning: previous declaration of
> 'bindresvport_sa' was here
Well, looking at linux, the declarations in netinet/in.h are guarded by
#if defined __USE_MISC || defined __USE_GNU
These symbols are activated in (linux's) features.h by:
#if defined _BSD_SOURCE || defined _SVID_SOURCE
# define __USE_MISC 1
#endif
#ifdef _GNU_SOURCE
# define __USE_GNU 1
#endif
Given that the only *SOURCE flags supported by cygwin's headers are:
_BSD_SOURCE
_POSIX_SOURCE
_XOPEN_SOURCE
_GNU_SOURCE
(and, the newlib headers don't employ the __USE_* indirection), I think
the correct fix is to modify cygwin's netinet/in.h to add the following
guard around the declaration of bindresvport and bindresvport_sa:
#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
If you concur, I'll post a patch to that effect to cygwin-patches (we
use our own header, not newlib's, for netinet/in.h).
--
Chuck
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple