Re: [Libtirpc-devel] Fwd: Re: proposed patch to rpcbind to provide finer-grained security controls than offered by the -i option
Steve Dickson, le Wed 15 Dec 2010 15:48:38 -0500, a écrit :
> > Building it with ``make -k'':
> > ../../master/src/auth_unix.c:187: error: ‘MAXHOSTNAMELEN’ undeclared (first use in this function)
> I don't understand what this is complaining about. Obviously
> MAXHOSTNAMELEN is define (see rpc/types.h) otherwise the non-hurd build
> would fail.
MAXHOSTNAMELEN is defined on some OSes, but not on others, as POSIX says
it's an optional macro (it's not defined when there is no limitation). See
> Also, I've realized adding:
> #ifndef MAXHOSTNAMELEN
> #define MAXHOSTNAMELEN 64
> to auth_unix.c eliminates this "error".
That's a crude way, but yes it should work.
> But again those ifdefs are not needed on "normal" builds so what
They are not needed on OSes which have a hostname lenght limitation, but
they are needed on OSes which don't.
> > ../../master/src/bindresvport.c:189: error: ‘IPV6_PORTRANGE’ undeclared (first use in this function)
> > ../../master/src/bindresvport.c:190: error: ‘IPV6_PORTRANGE_LOW’ undeclared (first use in this function)
> This is true but these defines are in non-Linux code so I guess
> the hurd builds defines both Linux and non-Linux parts of the code?
It just means that these are not Linux-only. But that doesn't mean it's
standard macros. And indeed, while some other IPV6_* macros are in
posix, IPV6_PORTRANGE* are not, and thus aren't standard.
> > ../../master/src/rpc_soc.c: In function ‘clnt_com_create’:
> > ../../master/src/rpc_soc.c:108: error: ‘SOCK_CLOEXEC’ undeclared (first use in this function)
> > ../../master/src/rpc_soc.c:108: error: (Each undeclared identifier is reported only once
> > ../../master/src/rpc_soc.c:108: error: for each function it appears in.)
> Again these are defined through sys/socket.h (actually in bits/socket.h).
On which systems? In glibc it's only defined for Linux, not for other
> So again I'm a bit confused as to what is needed...
Make that part of the code ifdefed-out (ending up in reduced