Problem reported by Tom G. Christensen in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00091.html>.
* tests/test-net_if.c (ni): Move to next the code that uses it,
so that it's declared only if needed.
+2013-01-13 Paul Eggert <eggert@cs.ucla.edu>
+
+ net_if-tests: port to Solaris 7 + GCC 3.4.6
+ Problem reported by Tom G. Christensen in
+ <http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00091.html>.
+ * tests/test-net_if.c (ni): Move to next the code that uses it,
+ so that it's declared only if needed.
+
2013-01-12 Paul Eggert <eggert@cs.ucla.edu>
net_if-tests: port to older Solaris
#include <net/if.h>
-static struct if_nameindex ni;
-
/* We do not yet have replacements for if_* functions on systems that
lack a native <net/if.h>. */
#if HAVE_NET_IF_H && HAVE_IF_NAMEINDEX
#endif /* HAVE_NET_IF_H */
#if !HAVE_NET_IF_H || HAVE_IF_NAMEINDEX
- return !IF_NAMESIZE + ni.if_index + !!ni.if_name;
+ {
+ static struct if_nameindex ni;
+ return !IF_NAMESIZE + ni.if_index + !!ni.if_name;
+ }
#else
return 0;
#endif