Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | From e0d86318227a23f00cf0f6639a6685bb9f5771a1 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 12 Dec 2017 09:42:19 -0800 |
| 4 | Subject: [PATCH] util.h: endian.h is available on musl on linux |
| 5 | |
| 6 | just checking for glibc alone is not enough since |
| 7 | it excludes musl, therefore check for platform |
| 8 | being linux as well |
| 9 | |
| 10 | Fixes build issues |
| 11 | |
| 12 | include/libisns/util.h:114:12: fatal error: sys/endian.h: No such file or directory |
| 13 | # include <sys/endian.h> |
| 14 | ^~~~~~~~~~~~~~ |
| 15 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 16 | Upstream-Status: Submitted |
| 17 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 19 | --- |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 20 | include/libisns/util.h | 2 +- |
| 21 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 22 | |
| 23 | diff --git a/include/libisns/util.h b/include/libisns/util.h |
| 24 | index 9a2bd13..6cc1a1b 100644 |
| 25 | --- a/include/libisns/util.h |
| 26 | +++ b/include/libisns/util.h |
| 27 | @@ -100,7 +100,7 @@ enum { |
| 28 | * There's no htonll yet |
| 29 | */ |
| 30 | #ifndef htonll |
| 31 | -# ifdef __GLIBC__ |
| 32 | +# if defined(__GLIBC__) || defined(__linux__) |
| 33 | # include <endian.h> |
| 34 | # include <byteswap.h> |
| 35 | # if __BYTE_ORDER == __BIG_ENDIAN |
| 36 | -- |
| 37 | 2.15.1 |
| 38 | |