Index: ossp-pkg/as/as-gui/as_uuid.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_uuid.cpp,v rcsdiff -q -kk '-r1.1' '-r1.2' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_uuid.cpp,v' 2>/dev/null --- as_uuid.cpp 2002/12/03 10:01:56 1.1 +++ as_uuid.cpp 2002/12/03 11:54:03 1.2 @@ -7,22 +7,47 @@ * Library General Public License. */ +#include +#include #include #include +#include +#include +#include #include "as_uuidgen.h" -#ifndef max - /* Define a general use max macro */ - #define max(a,b) ((a) > (b) ? (a) : (b)) +/* Include whatever autoconf found */ +#ifdef HAVE_CONFIG_H +#include "ac_config.h" +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include #endif +#ifdef HAVE_SYS_SOCKIO_H +#include +#endif /* HAVE_SYS_SOCKIO_H */ #ifdef HAVE_NET_IF_H - #include /* For use in get_node_id() */ +#include +#endif /* HAVE_NET_IF_H */ +#ifdef HAVE_NETINET_IN_H +#include +#endif /* HAVE_NETINET_IN_H */ - /* Define the size of a interface address */ - #define ifreq_size(i) max(sizeof(struct ifreq), sizeof((i).ifr_name)+(i).ifr_addr.sa_len) -#endif +#ifndef max +/* Define a general use max macro */ +#define max(a,b) ((a) > (b) ? (a) : (b)) +#endif /* max */ + +#ifdef HAVE_NET_IF_H +/* Define the size of a interface address */ +#define ifreq_size(i) max(sizeof(struct ifreq), sizeof((i).ifr_name)+(i).ifr_addr.sa_len) +#endif /* HAVE_NET_IF_H */ static int get_random_fd(void) @@ -104,7 +129,7 @@ return -1; } n = ifc.ifc_len; - for (i = 0; i < n; i+= ifreq_size(*ifr) ) { + for (i = 0; i < n; i+= ifreq_size(ifr)) { ifrp = (struct ifreq *)((char *) ifc.ifc_buf+i); strncpy(ifr.ifr_name, ifrp->ifr_name, IFNAMSIZ); #ifdef HAVE_SIOCGIFHWADDR Index: ossp-pkg/as/as-gui/configure.in RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/configure.in,v rcsdiff -q -kk '-r1.9' '-r1.10' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/configure.in,v' 2>/dev/null --- configure.in 2002/12/03 10:48:25 1.9 +++ configure.in 2002/12/03 11:54:03 1.10 @@ -54,9 +54,7 @@ dnl Checks header requirements AC_HEADER_STDC AC_HEADER_TIME -AC_CHECK_HEADER(net/if.h,,, -[#include -#include ]) +AC_CHECK_HEADERS(net/if.h netinet/in.h) dnl Portable thread conf from acx_pthread.m4 autoconf macro ACX_PTHREAD