From 4f1d68d0b8765c11ca8ee5b7f199f05bb4380253 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 23 Nov 2010 15:46:55 +0000 Subject: ethtool: Work around old 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 --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index f2401a4..2e31e3a 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,13 @@ dnl Checks for header files. AC_CHECK_HEADERS(sys/ioctl.h) dnl Checks for typedefs, structures, and compiler characteristics. +AC_MSG_CHECKING([whether defines big-endian types]) +AC_TRY_COMPILE([#include ], + [__be16 foo;__be32 bar;], + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_BE_TYPES], [1], + [Define to 1 if defines big-endian types])], + [AC_MSG_RESULT(no)]) dnl Checks for library functions. AC_HEADER_STDC -- cgit v1.2.1