]> git.sur5r.net Git - bacula/bacula/commitdiff
A more correct fix for lz4.c on Solaris 10
authorKern Sibbald <kern@sibbald.com>
Mon, 19 Jun 2017 08:09:34 +0000 (10:09 +0200)
committerKern Sibbald <kern@sibbald.com>
Mon, 19 Jun 2017 08:09:34 +0000 (10:09 +0200)
bacula/src/lib/lz4.c

index e2858417f5771e289db24b72bd7fa76e4623abe2..62a4aed490b9f60fab854cdfd09dde8a022de59f 100644 (file)
@@ -173,7 +173,9 @@ Note : this source file requires "lz4_encoder.h"
 #  define _PACKED
 #endif
 
-#if !defined(LZ4_FORCE_UNALIGNED_ACCESS) && !defined(__GNUC__) && !defined(HAVE_SOLARIS10)
+#if !defined(LZ4_FORCE_UNALIGNED_ACCESS) && !defined(__GNUC__) && defined(HAVE_SOLARIS10)
+#  pragma pack(1)
+#elif !defined(LZ4_FORCE_UNALIGNED_ACCESS) && !defined(__GNUC__)
 #  pragma pack(push, 1)
 #endif
 
@@ -181,7 +183,9 @@ typedef struct _U16_S { U16 v; } _PACKED U16_S;
 typedef struct _U32_S { U32 v; } _PACKED U32_S;
 typedef struct _U64_S { U64 v; } _PACKED U64_S;
 
-#if !defined(LZ4_FORCE_UNALIGNED_ACCESS) && !defined(__GNUC__) && !defined(HAVE_SOLARIS10)
+#if !defined(LZ4_FORCE_UNALIGNED_ACCESS) && !defined(__GNUC__) && defined(HAVE_SOLARIS10)
+#  pragma pack()
+#elif !defined(LZ4_FORCE_UNALIGNED_ACCESS) && !defined(__GNUC__)
 #  pragma pack(pop)
 #endif