Subject: bug#8383: 24.0.50; revno 103781 and net/if.h

From: Peter Dyballa <[email-masked]>
Date: Wed, 30 Mar 2011 23:53:18 +0200

Hello!

The configure script early checks for net/if.h. Twelve days ago  
(2011-03-18) it reported:

	checking for net/if.h... yes
	checking whether struct tm is in sys/time.h or time.h... time.h
	checking for struct tm.tm_zone... yes
	checking for struct tm.tm_gmtoff... yes
	checking for struct ifreq.ifr_flags... yes
	checking for struct ifreq.ifr_hwaddr... no
	checking for struct ifreq.ifr_netmask... no
	checking for struct ifreq.ifr_broadaddr... yes
	checking for struct ifreq.ifr_addr... yes

Now it reports:

	checking for net/if.h... no
	checking whether struct tm is in sys/time.h or time.h... time.h
	checking for struct tm.tm_zone... yes
	checking for struct tm.tm_gmtoff... yes
	checking for struct ifreq.ifr_flags... no
	checking for struct ifreq.ifr_hwaddr... no
	checking for struct ifreq.ifr_netmask... no
	checking for struct ifreq.ifr_broadaddr... no
	checking for struct ifreq.ifr_addr... no

In the list of included C header files I can see a difference:

         past                                    now
. /usr/include/unistd.h               . /usr/include/unistd.h
.. /usr/include/sys/unistd.h          .. /usr/include/sys/unistd.h
.. /usr/include/sys/select.h          .. /usr/include/sys/select.h
... /usr/include/sys/_structs.h       ... /usr/include/sys/_structs.h
... /usr/include/sys/_select.h        ... /usr/include/sys/_select.h
. /usr/include/sys/socket.h
.. /usr/include/machine/_param.h
... /usr/include/ppc/_param.h
. /usr/include/net/if.h               . /usr/include/net/if.h
.. /usr/include/net/if_var.h          .. /usr/include/net/if_var.h
... /usr/include/sys/time.h           ... /usr/include/sys/time.h
.... /usr/include/sys/_structs.h      .... /usr/include/sys/_structs.h
.... /usr/include/time.h              .... /usr/include/time.h
..... /usr/include/_structs.h         ..... /usr/include/_structs.h
...... /usr/include/sys/_structs.h    ...... /usr/include/sys/_structs.h
... /usr/include/sys/queue.h          ... /usr/include/sys/queue.h

The difference may come from removing these blocks from configure:

	for ac_header in sys/socket.h
	do :
	  ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h"  
"ac_cv_header_sys_socket_h" "$ac_includes_default"
	if test "x$ac_cv_header_sys_socket_h" = xyes; then :
	  cat >>confdefs.h <<_ACEOF
	#define HAVE_SYS_SOCKET_H 1
	_ACEOF
	
	fi
	
	done

	for ac_header in net/if.h
	do :
	  ac_fn_c_check_header_compile "$LINENO" "net/if.h"  
"ac_cv_header_net_if_h" "$ac_includes_default
	#if HAVE_SYS_SOCKET_H
	#include <sys/socket.h>
	#endif
	"
	if test "x$ac_cv_header_net_if_h" = xyes; then :
	  cat >>confdefs.h <<_ACEOF
	#define HAVE_NET_IF_H 1
	_ACEOF
	
	fi
	
	done

The tests for ifreq.ifr_* show errors like these:

	In file included from conftest.c:87:0:
	/usr/include/net/if.h:259:19: error: field 'ifru_addr' has incomplete  
type
	/usr/include/net/if.h:260:19: error: field 'ifru_dstaddr' has  
incomplete type
	/usr/include/net/if.h:261:19: error: field 'ifru_broadaddr' has  
incomplete type
	/usr/include/net/if.h:298:18: error: field 'ifra_addr' has incomplete  
type
	/usr/include/net/if.h:299:18: error: field 'ifra_broadaddr' has  
incomplete type
	/usr/include/net/if.h:300:18: error: field 'ifra_mask' has incomplete  
type
	/usr/include/net/if.h:374:26: error: field 'addr' has incomplete type
	/usr/include/net/if.h:375:26: error: field 'dstaddr' has incomplete  
type

--
Greetings

   Pete

Only useless documentation transcends the first two laws.
				– Arnold's Third Law of Documentation