[neard][PATCH 1/4] include: include endian.h to fix missing __BYTE_ORDER definition on Debian Stretch

Krzysztof Kozlowski <[email protected]>
Newsgroups dev.linux.lists.oe-linux-nfc,org.01.lists.linux-nfc
Message-ID <[email protected]>
Code should pull explicitly headers for necessary symbols instead of
relying on dependencies.  Lack of endian.h caused build failures on
Debian Stretch:

    In file included from tools/nfctool/ndef-decode.c:28:0:
    include/near/types.h:43:5: error: "__BYTE_ORDER" is not defined [-Werror=undef]
     #if __BYTE_ORDER == __LITTLE_ENDIAN

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
 include/types.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/types.h b/include/types.h
index c4a8d6a31886..1dd8de530d58 100644
--- a/include/types.h
+++ b/include/types.h
@@ -23,6 +23,7 @@
 #define __NEAR_TYPES_H
 
 #include <byteswap.h>
+#include <endian.h>
 
 #define near_get_unaligned(ptr)			\
 ({						\
-- 
2.32.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.