blob: 982291b274aa89ff1eedd6699bfb2b220ce2a9a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
diff -ur a/calendar/libical/src/libical/icaltz-util.c b/calendar/libical/src/libical/icaltz-util.c
--- a/calendar/libical/src/libical/icaltz-util.c 2007-10-12 07:31:10 +0100
+++ b/calendar/libical/src/libical/icaltz-util.c 2007-10-19 11:34:38 +0100
@@ -23,9 +23,11 @@
#include <string.h>
#if defined(sun) && defined(__SVR4)
#include <sys/byteorder.h>
-#else
+#elif defined(__linux__)
#include <byteswap.h>
#include <endian.h>
+#else
+#include <sys/endian.h>
#endif
#include <limits.h>
#include <time.h>
@@ -89,7 +91,11 @@
if ((BYTE_ORDER == BIG_ENDIAN) && sizeof (int) == 4)
return *(const int *) ptr;
else if (BYTE_ORDER == LITTLE_ENDIAN && sizeof (int) == 4)
+#ifdef __linux__
return bswap_32 (*(const int *) ptr);
+#else
+ return bswap32 (*(const uint32_t *) ptr);
+#endif
#endif
else
{
|