app/testpmd: fix macro check for little endian
authorBruce Richardson <bruce.richardson@intel.com>
Mon, 1 Dec 2014 11:38:55 +0000 (11:38 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 1 Dec 2014 15:44:40 +0000 (16:44 +0100)
commit64741f237cf2990804dd85328c7dd6709f79c346
tree1576ee4ed522cbf78692d12dfe887d4b2efa92ca
parent257dcd86c04a5a0b6d8c239a146bddf38aa628ee
app/testpmd: fix macro check for little endian

Compiling with clang on FreeBSD gave a compilation error:
app/test-pmd/csumonly.c:84:5: fatal error: '__BYTE_ORDER' is not defined, evaluates to 0 [-Wundef]

Querying the preprocessor defines show both the define and value used
are incorrect.
$ clang -dM -E - < /dev/null | grep BYTE
\#define  __BYTE_ORDER__  __ORDER_LITTLE_ENDIAN__

Changing the check to  __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ then
resolves the issue.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
app/test-pmd/csumonly.c