git-svn: trunk@1766
Tomasz Kojm authored on 2005/11/22 06:39:25... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Mon Nov 21 22:36:35 CET 2005 (tk) |
|
2 |
+--------------------------------- |
|
3 |
+ * libclamav/zziplib/zzip-zip.c: fix pointer misalignment problem on sparc64 |
|
4 |
+ Thanks to Clint Adams <schizo*debian.org> |
|
5 |
+ |
|
1 | 6 |
Mon Nov 21 21:57:29 CET 2005 (tk) |
2 | 7 |
--------------------------------- |
3 | 8 |
* configure.in: check for __attribute__((aligned)) |
... | ... |
@@ -15,6 +15,8 @@ |
15 | 15 |
#include "clamav-config.h" |
16 | 16 |
#endif |
17 | 17 |
|
18 |
+#include "target.h" |
|
19 |
+ |
|
18 | 20 |
#include <zzip.h> /* archive handling */ |
19 | 21 |
#include <zzip-file.h> |
20 | 22 |
#include <zzipformat.h> |
... | ... |
@@ -640,7 +642,11 @@ __zzip_dir_parse (ZZIP_DIR* dir) |
640 | 640 |
{ |
641 | 641 |
zzip_error_t rv; |
642 | 642 |
zzip_off_t filesize; |
643 |
+#if defined(TARGET_CPU_SPARC64) && defined(HAVE_ATTRIB_ALIGNED) |
|
644 |
+ struct zzip_disk_trailer trailer __attribute__((aligned)); |
|
645 |
+#else |
|
643 | 646 |
struct zzip_disk_trailer trailer; |
647 |
+#endif |
|
644 | 648 |
/* if (! dir || dir->fd < 0) |
645 | 649 |
* { rv = EINVAL; goto error; } |
646 | 650 |
*/ |