Files
haikuports/dev-libs/libical/patches/libical-2.0.0.patchset
Raefaldhi Amartya Junior 643a3b3cb4 libical: Add new recipe (GCI 2016) (#933)
Adding a recipe for libical, an implementation of the iCalendar
protocols and data formats.
2016-12-19 13:45:35 +00:00

39 lines
1.1 KiB
Plaintext

From 2f7b40a28c76c4807d19063bd45588527fa77340 Mon Sep 17 00:00:00 2001
From: raefaldhia <raefaldhiamartya@gmail.com>
Date: Mon, 19 Dec 2016 08:47:41 +0700
Subject: Add compatibility to build in haiku
diff --git a/src/libical/icaltz-util.c b/src/libical/icaltz-util.c
index 03f0a58..3482636 100644
--- a/src/libical/icaltz-util.c
+++ b/src/libical/icaltz-util.c
@@ -83,6 +83,8 @@
#define bswap_64 __builtin_bswap64
#endif
+#include <ByteOrder.h>
+
typedef struct
{
char ttisgmtcnt[4];
@@ -132,13 +134,13 @@ static int decode(const void *ptr)
#if defined(_BIG_ENDIAN)
return *(const int *)ptr;
#else
- return BSWAP_32(*(const int *)ptr);
+ return B_SWAP_INT32(*(const int *)ptr);
#endif
#else
if ((BYTE_ORDER == BIG_ENDIAN) && sizeof(int) == 4) {
return *(const int *)ptr;
} else if (BYTE_ORDER == LITTLE_ENDIAN && sizeof(int) == 4) {
- return (int)bswap_32(*(const unsigned int *)ptr);
+ return (int)B_SWAP_INT32(*(const unsigned int *)ptr);
#endif
} else {
const unsigned char *p = ptr;
--
2.7.0