diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-11-23 15:46:55 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2010-11-23 15:50:48 +0000 |
commit | 4f1d68d0b8765c11ca8ee5b7f199f05bb4380253 (patch) | |
tree | 457f39e4669f7cb429c4f3a79b52dadfd6ddcdb0 /ethtool-util.h | |
parent | 9d6cd2ae2c62520e5d263cee1421e1dbbd20ffee (diff) | |
download | ethtool-4f1d68d0b8765c11ca8ee5b7f199f05bb4380253.tar.gz |
ethtool: Work around old <linux/types.h> without big-endian types
Add an autoconf test for whether __be16 and __be32 are defined.
If not, define them in ethtool-util.h.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'ethtool-util.h')
-rw-r--r-- | ethtool-util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ethtool-util.h b/ethtool-util.h index 4ef3a9f..f053028 100644 --- a/ethtool-util.h +++ b/ethtool-util.h @@ -6,6 +6,12 @@ #include <sys/types.h> #include <endian.h> +/* ethtool.h expects these to be defined by <linux/types.h> */ +#ifndef HAVE_BE_TYPES +typedef __uint16_t __be16; +typedef __uint32_t __be32; +#endif + #include "ethtool-copy.h" typedef unsigned long long u64; |