diff options
author | 2017-03-02 16:15:51 +0100 | |
---|---|---|
committer | 2017-03-03 14:41:36 +0100 | |
commit | ce3d555e43e3795b5d9507fcfc76b7a0a92fd0d6 (patch) | |
tree | 3a9e9f8f6a62c7146fb391eae34481b2af4f7ff2 /buildtools/pmdinfogen/pmdinfogen.h | |
parent | 6b3e017e5d25f15da73f7700f7f2ac553ef1a2e9 (diff) |
Imported Upstream version 16.11.1
Change-Id: I1e965265578efaaf08e5628607f53d2386d2df9f
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'buildtools/pmdinfogen/pmdinfogen.h')
-rw-r--r-- | buildtools/pmdinfogen/pmdinfogen.h | 10 |
1 files changed, 7 insertions, 3 deletions
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 <sys/types.h> #include <sys/stat.h> #include <sys/mman.h> +#ifdef __linux__ +#include <endian.h> +#else +#include <sys/endian.h> +#endif #include <fcntl.h> #include <unistd.h> #include <elf.h> #include <rte_config.h> #include <rte_pci.h> -#include <rte_byteorder.h> /* 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; \ }) |