[BUG] lib/interfaces.c - Solaris struct ifreq.ifr_netmask missing

Jeremy Allison jra at samba.org
Thu Oct 25 01:33:33 GMT 2007


On Wed, Oct 24, 2007 at 06:40:01PM -0500, Gerald (Jerry) Carter wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Jeremy,
> 
> The autoconf failure is:
> 
>   In file included from conftest.c:439 :
>   ./lib/interfaces.c: In function `_get_interfaces':
>   ./lib/interfaces.c:231: error: structure has no member
>      named  `ifr_netmask'
>   configure:49185: $? = 1
>   configure: program exited with status 1
>   configure: failed program was:
> 
> We need to add this code (probably to lib/replace/network.h):
> 
>   #ifndef ifr_netmask
>   #  define ifr_netmask ifr_addrs
>   #endif
> 
> The reason this works (same as why it would work on Linux),
> is that the "struct sockaddr" members in struct ifreq (see
> /usr/include/linux/if.h) are contained in a union.  So
> ifr_addr or ifr_netmask are really the same.  Solaris 8
> at least just does not name the ifr_netmask macro explicitly.
> 
> The end result right now is that the HAVE_IFACE_IFCONF test
> is failing on Solaris where as before it succeeded.  In tre
> older code I think we determined the netmask manually.
> 
> Thanks to Danilo for helping to point this out.

Can you send me a copy of the if.h from Solaris so I
can do understand exactly what's missing please ?

Thanks,

	Jeremy.


More information about the samba-technical mailing list