X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=buildtools%2Fpmdinfogen%2Fpmdinfogen.h;h=e9eabffb439208b6889f08d049227adb2e954a1f;hb=fa64fa74edc2b1179fe9c004cd50131a79672ee0;hp=1da2966f9b9d6a44a88a6e73daf352d8d88c0392;hpb=8be94df6e9f5f70516cb86d82dd04fefaa0fe8b3;p=deb_dpdk.git diff --git a/buildtools/pmdinfogen/pmdinfogen.h b/buildtools/pmdinfogen/pmdinfogen.h index 1da2966f..e9eabffb 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; \ })