$NetBSD: patch-as,v 1.2 2014/02/01 01:44:53 markd Exp $

--- src/libical/icaltz-util.c.orig	2013-04-14 17:24:42.000000000 +0000
+++ src/libical/icaltz-util.c
@@ -29,6 +29,7 @@
 #include <stdint.h>
 #endif
 
+#if 0 /* XXX see below */
 #if defined(sun) && defined(__SVR4)
 #include <sys/types.h>
 #include <sys/byteorder.h>
@@ -49,6 +50,7 @@
 # endif
 # endif
 #endif
+#endif
 
 #ifdef _MSC_VER
 #if !defined(HAVE_BYTESWAP_H) && !defined(HAVE_SYS_ENDIAN_H) && !defined(HAVE_ENDIAN_H)
@@ -140,6 +142,7 @@ extern const char *ical_tzid_prefix;
 static int
 decode (const void *ptr)
 {
+#if 0 /* XXX nonportable, possibly alignment problems */
 #if defined(sun) && defined(__SVR4)
     if (sizeof (int) == 4)
 #ifdef _BIG_ENDIAN
@@ -154,9 +157,10 @@ decode (const void *ptr)
         return bswap_32 (*(const int *) ptr);
 #endif
 	else
+#endif
 	{
 		const unsigned char *p = ptr;
-		int result = *p & (1 << (CHAR_BIT - 1)) ? ~0 : 0;
+		unsigned int result = *p & (1 << (CHAR_BIT - 1)) ? ~0 : 0;
 
 		result = (result << 8) | *p++;
 		result = (result << 8) | *p++;
