From 9f47336b5e9c0f3193a2f7040e53c22bb255c6d2 Mon Sep 17 00:00:00 2001 From: mkm Date: Tue, 7 Jun 2022 11:57:11 +0200 Subject: [PATCH] use cbor_ntohll instead of ntohl directly --- src/compilersupport_p.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compilersupport_p.h b/src/compilersupport_p.h index 08798016..0423f433 100644 --- a/src/compilersupport_p.h +++ b/src/compilersupport_p.h @@ -156,7 +156,7 @@ (defined(BYTE_ORDER) && defined(LITTLE_ENDIAN) && BYTE_ORDER == LITTLE_ENDIAN) || \ defined(_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || defined(__MIPSEL__) || \ defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64) -# define ntohll(x) ((ntohl((uint32_t)(x)) * UINT64_C(0x100000000)) + (ntohl((x) >> 32))) +# define ntohll(x) ((cbor_ntohl((uint32_t)(x)) * UINT64_C(0x100000000)) + (cbor_ntohl((x) >> 32))) # define htonll ntohll # else # error "Unable to determine byte order!" @@ -202,4 +202,3 @@ static inline bool add_check_overflow(size_t v1, size_t v2, size_t *r) } #endif /* COMPILERSUPPORT_H */ -