From 3a6648f706734bf991438f89d7064c2035ebca8f Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Sat, 1 Aug 2020 18:23:35 +0200 Subject: [PATCH] Fix build error on big endian architectures --- libretroshare/src/util/rsendian.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/util/rsendian.h b/libretroshare/src/util/rsendian.h index 925542f0d..29504a34b 100644 --- a/libretroshare/src/util/rsendian.h +++ b/libretroshare/src/util/rsendian.h @@ -26,7 +26,7 @@ * This file provide convenient integer endiannes conversion utilities. * Instead of providing them with different names for each type (a la C htonl, * htons, ntohl, ntohs ), which make them uncomfortable to use, expose a - * templated function `rs_endian_fix` to reorder integers representation byets + * templated function `rs_endian_fix` to reorder integers bytes representation * when sending or receiving from the network. */ /* enforce LITTLE_ENDIAN on Windows */ @@ -46,7 +46,7 @@ template inline INTTYPE rs_endian_fix(INTTYPE val) swapped |= (val >> (8*(sizeof(INTTYPE)-i-1)) & 0xFF) << (8*i); return swapped; #else - return hostI; + return val; #endif };