X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=blobdiff_plain;f=buildtools%2Fpmdinfogen%2Fpmdinfogen.h;fp=buildtools%2Fpmdinfogen%2Fpmdinfogen.h;h=e9eabffb439208b6889f08d049227adb2e954a1f;hp=1da2966f9b9d6a44a88a6e73daf352d8d88c0392;hb=112fc39b829039ee4ade210c464d26fecde7eac0;hpb=814c8822ef7b2255004d2130083b7d8ce852b733 diff --git a/buildtools/pmdinfogen/pmdinfogen.h b/buildtools/pmdinfogen/pmdinfogen.h index 1da2966f9b..e9eabffb43 100644 --- a/buildtools/pmdinfogen/pmdinfogen.h +++ b/buildtools/pmdinfogen/pmdinfogen.h @@ -16,12 +16,16 @@ #include #include #include +#ifdef __linux__ +#include +#else +#include +#endif #include #include #include #include #include -#include /* On BSD-alike OSes elf.h defines these according to host's word size */ #undef ELF_ST_BIND @@ -75,9 +79,9 @@ #define CONVERT_NATIVE(fend, width, x) ({ \ typeof(x) ___x; \ if ((fend) == ELFDATA2LSB) \ - ___x = rte_le_to_cpu_##width(x); \ + ___x = le##width##toh(x); \ else \ - ___x = rte_be_to_cpu_##width(x); \ + ___x = be##width##toh(x); \ ___x; \ })