On 10/30/14 at 11:48am, Wang Sheng-Hui wrote: > Hi, > > I used CentOS 6.5, and failed building the latest ovs: > > libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I ./include -I > ./include -I ./lib -I ./lib -Wstrict-prototypes -Wall -Wextra > -Wno-sign-compare -Wpointer-arith -Wno-format-zero-length -Wswitch-enum > -Wunused-parameter -Wbad-function-cast -Wcast-align -Wmissing-prototypes > -Wmissing-field-initializers -fno-strict-aliasing -g -O2 -MT > lib/netdev-linux.lo -MD -MP -MF lib/.deps/netdev-linux.Tpo -c > lib/netdev-linux.c -o lib/netdev-linux.o > lib/netdev-linux.c:144: error: redefinition of ‘struct rtnl_link_stats64’ > make[2]: *** [lib/netdev-linux.lo] Error 1 > make[2]: Leaving directory `/export/rwang/ovs-test' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/export/rwang/ovs-test' > make: *** [all] Error 2
Does this help? diff --git a/configure.ac b/configure.ac index a8a530a..a73e807 100644 --- a/configure.ac +++ b/configure.ac @@ -67,7 +67,7 @@ AC_CHECK_DECLS([sys_siglist], [], [], [[#include <signal.h>]]) AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec, struct stat.st_mtimensec], [], [], [[#include <sys/stat.h>]]) AC_CHECK_MEMBERS([struct ifreq.ifr_flagshigh], [], [], [[#include <net/if.h>]]) -AC_CHECK_TYPES([struct rtnl_link_stats64], [], [], +AC_CHECK_MEMBERS([struct rtnl_link_stats64.rx_packets], [], [], [[#include <linux/if_link.h>]]) AC_CHECK_FUNCS([mlockall strnlen getloadavg statvfs getmntent_r]) AC_CHECK_HEADERS([mntent.h sys/statvfs.h linux/types.h linux/if_ether.h stdatomic.h]) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index ff7c274..7efeab5 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -139,7 +139,7 @@ struct tpacket_auxdata { }; /* Linux 2.6.35 introduced IFLA_STATS64 and rtnl_link_stats64. */ -#ifndef HAVE_STRUCT_RTNL_LINK_STATS64 +#ifndef HAVE_STRUCT_RTNL_LINK_STATS64_RX_PACKETS #define IFLA_STATS64 23 struct rtnl_link_stats64 { uint64_t rx_packets; _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev