1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

- Fix build on sparc64

This commit is contained in:
Michael Johnson 2006-07-08 17:06:24 +00:00
parent f8de20aeba
commit 880b3cfa26
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=167201
2 changed files with 4 additions and 8 deletions

View File

@ -30,10 +30,6 @@ INSTALLS_SHLIB= yes
.include <bsd.port.pre.mk>
.if ${ARCH}==sparc64
BROKEN= does not compile on ${ARCH}
.endif
.if defined(WITHOUT_NLS)
CONFIGURE_ENV+= ac_cv_header_libintl_h=no
PLIST_SUB+= NLS="@comment "

View File

@ -1,5 +1,5 @@
--- src/bmp.c.orig Mon Apr 24 23:25:31 2006
+++ src/bmp.c Thu Jun 8 18:59:00 2006
--- src/bmp.c.orig Mon Apr 24 10:25:31 2006
+++ src/bmp.c Sat Jul 8 13:02:51 2006
@@ -41,10 +41,28 @@
#include <fcntl.h>
#include <unistd.h>
@ -12,8 +12,8 @@
+#include <sys/endian.h>
+
+#if __FreeBSD_version >= 500000
+#define BMPSwabShort(x) bswap16(x)
+#define BMPSwabLong(x) bswap32(x)
+#define BMPSwabShort(x) *x = bswap16(*x)
+#define BMPSwabLong(x) *x = bswap32(*x)
+#else
+#define BMPSwabShort(x) (be16toh(x))
+#define BMPSwabLong(x) (be32toh(x))