diff options
author | Haru <haru@dotalux.com> | 2014-01-23 16:51:56 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-01-23 17:14:09 +0100 |
commit | e68d860dbaa6b1bcf8104463cd3001ae946b7d4e (patch) | |
tree | 38f6757fbc2d4ad34e89b3d48d5ed221a3125147 /src/map/clif.c | |
parent | 22b7f90297184775ad94d8cb4806e8664c78d934 (diff) | |
download | hercules-e68d860dbaa6b1bcf8104463cd3001ae946b7d4e.tar.gz hercules-e68d860dbaa6b1bcf8104463cd3001ae946b7d4e.tar.bz2 hercules-e68d860dbaa6b1bcf8104463cd3001ae946b7d4e.tar.xz hercules-e68d860dbaa6b1bcf8104463cd3001ae946b7d4e.zip |
Compatibility fixes for NetBSD and Solaris
- Fixed some warnings in NetBSD (5.x and 6.x) and Solaris (11)
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 5f835a8ab..fe3e7cfe9 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -12959,14 +12959,18 @@ bool clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) { BITMAP_WIDTH = 24, BITMAP_HEIGHT = 24, }; +#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute #pragma pack(push, 1) +#endif // not NetBSD < 6 / Solaris struct s_bitmaptripple { //uint8 b; //uint8 g; //uint8 r; unsigned int rgb:24; } __attribute__((packed)); +#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute #pragma pack(pop) +#endif // not NetBSD < 6 / Solaris uint8 buf[1800]; // no well-formed emblem bitmap is larger than 1782 (24 bit) / 1654 (8 bit) bytes unsigned long buf_len = sizeof(buf); int header = 0, bitmap = 0, offbits = 0, palettesize = 0, i = 0; |