Rebased ref, commits from common ancestor: commit 2c4e4dbc6a2cfecd19d683d445cb163da09bf290 Author: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> AuthorDate: Wed Oct 7 16:17:06 2020 +0200 Commit: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> CommitDate: Thu Oct 8 08:40:26 2020 +0200
Fix nss build on centos 5 baseline glic too old Change-Id: I7050d87f8c84780feb154ec3ff5fc5535247cd9e diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk index cf7ad65803a1..047ee11c8377 100644 --- a/external/nss/UnpackedTarball_nss.mk +++ b/external/nss/UnpackedTarball_nss.mk @@ -20,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\ $(if $(findstring 120_70,$(VCVER)_$(WINDOWS_SDK_VERSION)), \ external/nss/nss-winXP-sdk.patch.1) \ $(if $(filter WNTMSC,$(OS)$(COM)),external/nss/nss-no-c99.patch) \ + external/nss/nss.oldglibc.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/nss/nss.oldglibc.patch.1 b/external/nss/nss.oldglibc.patch.1 new file mode 100644 index 000000000000..7c78f6356dc1 --- /dev/null +++ b/external/nss/nss.oldglibc.patch.1 @@ -0,0 +1,97 @@ +diff -ur nss.org/nss/lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h nss/nss/lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h +--- nss.org/nss/lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h 2020-10-08 08:38:04.319549594 +0200 ++++ nss/nss/lib/freebl/verified/kremlin/include/kremlin/lowstar_endianness.h 2020-10-08 08:38:56.872385737 +0200 +@@ -198,6 +198,93 @@ + memcpy(b, &i, 8); + } + ++ ++#if !defined(__bswap_constant_64) ++ ++static __inline __uint16_t ++__uint16_identity (__uint16_t __x) ++{ ++ return __x; ++} ++ ++static __inline __uint32_t ++__uint32_identity (__uint32_t __x) ++{ ++ return __x; ++} ++ ++static __inline __uint64_t ++__uint64_identity (__uint64_t __x) ++{ ++ return __x; ++} ++ ++/* Swap bytes in 16-bit value. */ ++#define __bswap_constant_16(x) \ ++ ((__uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))) ++ ++static __inline __uint16_t ++__bswap_16 (__uint16_t __bsx) ++{ ++#if __GNUC_PREREQ (4, 8) ++ return __builtin_bswap16 (__bsx); ++#else ++ return __bswap_constant_16 (__bsx); ++#endif ++} ++ ++/* Swap bytes in 32-bit value. */ ++#define __bswap_constant_32(x) \ ++ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) \ ++ | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) ++ ++static __inline __uint32_t ++__bswap_32 (__uint32_t __bsx) ++{ ++#if __GNUC_PREREQ (4, 3) ++ return __builtin_bswap32 (__bsx); ++#else ++ return __bswap_constant_32 (__bsx); ++#endif ++} ++ ++/* Swap bytes in 64-bit value. */ ++#define __bswap_constant_64(x) \ ++ ((((x) & 0xff00000000000000ull) >> 56) \ ++ | (((x) & 0x00ff000000000000ull) >> 40) \ ++ | (((x) & 0x0000ff0000000000ull) >> 24) \ ++ | (((x) & 0x000000ff00000000ull) >> 8) \ ++ | (((x) & 0x00000000ff000000ull) << 8) \ ++ | (((x) & 0x0000000000ff0000ull) << 24) \ ++ | (((x) & 0x000000000000ff00ull) << 40) \ ++ | (((x) & 0x00000000000000ffull) << 56)) ++ ++__extension__ static __inline __uint64_t ++__bswap_64 (__uint64_t __bsx) ++{ ++#if __GNUC_PREREQ (4, 3) ++ return __builtin_bswap64 (__bsx); ++#else ++ return __bswap_constant_64 (__bsx); ++#endif ++} ++# define htobe16(x) __bswap_16 (x) ++# define htole16(x) __uint16_identity (x) ++# define be16toh(x) __bswap_16 (x) ++# define le16toh(x) __uint16_identity (x) ++ ++# define htobe32(x) __bswap_32 (x) ++# define htole32(x) __uint32_identity (x) ++# define be32toh(x) __bswap_32 (x) ++# define le32toh(x) __uint32_identity (x) ++ ++# define htobe64(x) __bswap_64 (x) ++# define htole64(x) __uint64_identity (x) ++# define be64toh(x) __bswap_64 (x) ++# define le64toh(x) __uint64_identity (x) ++ ++#endif // !defined(__bswap_constant_64) ++ + /* Legacy accessors so that this header can serve as an implementation of + * C.Endianness */ + #define load16_le(b) (le16toh(load16(b))) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits