[netperf-talk] Errors compiling netperf on Opteron running Fedora-9

Rahul Nabar rpnabar at gmail.com
Mon Sep 8 17:42:00 PDT 2008


On Mon, Sep 8, 2008 at 7:31 PM, Rick Jones <rick.jones2 at hp.com> wrote:
>
> sigh, whack-a-mole
>
> there are some typdefs in src/netdrv_ethtool.c which probably need some
> #ifndef/#endif around them.  At least I _think_ I can get away with that -
> can you try the following:

Thanks Rick. So in the file /src/netdrv_ethtool.c I added the two pair
of ifndef-endif statements around the blocks that your diff showed.
That's what you meant, right?

Now the block looks like shown at the very bottom of the email. But a
new error now.

************************************************************************
In file included from /usr/include/linux/types.h:6,
                 from /usr/include/linux/ethtool.h:15,
                 from netdrv_ethtool.c:33:
/usr/include/asm/types.h:29: error: conflicting types for '__u64'
netdrv_ethtool.c:19: error: previous declaration of '__u64' was here
make[3]: *** [netdrv_ethtool.o] Error 1
make[3]: Leaving directory `/usr/local/src/netperf-2.4.4/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/netperf-2.4.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/netperf-2.4.4'
make: *** [all] Error 2
***********************************************************************

Sugestions, again? Apologies for bothering you yet again!

-- 
Rahul

*************************************************************************************
/* alas, direct inclusion of ethtool.h depends on some types not
   normally found in nature, which we must provide or things will be
   quite unhappy. */

#ifndef __u64
typedef __uint64_t __u64;
typedef __uint32_t __u32;
typedef __uint16_t __u16;
typedef __uint8_t  __u8;
#endif

#ifndef u64
/* older ones want them without the leading underscores */
typedef __uint64_t u64;
typedef __uint32_t u32;
typedef __uint16_t u16;
typedef __uint8_t  u8;
#endif

#include <linux/ethtool.h>
************************************************************************


More information about the netperf-talk mailing list