pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/45074: devel/libvolume_id fails ot build on solaris 10
The following reply was made to PR pkg/45074; it has been noted by GNATS.
From: Daniel Vergien <daniel.vergien%googlemail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: pkg/45074: devel/libvolume_id fails ot build on solaris 10
Date: Fri, 17 Jun 2011 10:36:03 +0200
This is a multi-part message in MIME format.
--------------020909010703070707030508
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
The attached replacments for patch-aa, patch-ab and patch-ad fix the
problem
--------------020909010703070707030508
Content-Type: text/plain;
name="patch-aa"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="patch-aa"
$NetBSD$
--- ddf_raid.c.orig 2007-12-27 01:05:32.000000000 +0000
+++ ddf_raid.c
@@ -22,9 +22,9 @@
#include <string.h>
#include <errno.h>
#include <ctype.h>
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
#include <sys/endian.h>
-#else
+#elif !defined(__APPLE__) && !defined(__sun)
#include <byteswap.h>
#endif /* __FreeBSD__ */
--------------020909010703070707030508
Content-Type: text/plain;
name="patch-ab"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="patch-ab"
$NetBSD$
--- linux_raid.c.orig 2007-12-27 01:03:43.000000000 +0000
+++ linux_raid.c
@@ -22,9 +22,9 @@
#include <string.h>
#include <errno.h>
#include <ctype.h>
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
#include <sys/endian.h>
-#else
+#elif !defined(__APPLE__) && !defined(__sun)
#include <byteswap.h>
#endif /* __FreeBSD__ */
--------------020909010703070707030508
Content-Type: text/plain;
name="patch-ad"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="patch-ad"
$NetBSD$
--- util.h.orig 2007-12-27 00:51:05.000000000 +0000
+++ util.h
@@ -19,7 +19,7 @@
# include <config.h>
#endif
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
#include <sys/endian.h>
#define __BYTE_ORDER _BYTE_ORDER
@@ -29,6 +29,39 @@
#define bswap_16 bswap16
#define bswap_32 bswap32
#define bswap_64 bswap64
+#elif defined(__APPLE__)
+#include <machine/endian.h>
+#include <libkern/OSByteOrder.h>
+
+#define __BYTE_ORDER BYTE_ORDER
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#define __BIG_ENDIAN BIG_ENDIAN
+
+#define bswap_16 OSSwapInt16
+#define bswap_32 OSSwapInt32
+#define bswap_64 OSSwapInt64
+#elif defined(__sun)
+// Code for Solaris defs adapted from:
+// MD5 message-digest algorithm.
+// by Colin Plumb in 1993, no copyright is claimed.
+
+//each solaris is different -- this won't work on 2.6 or 2.7
+#include <sys/byteorder.h>
+
+#define bswap_16 BSWAP_16
+#define bswap_32 BSWAP_32
+#define bswap_64 BSWAP_64
+
+#define __LITTLE_ENDIAN 1234
+#define __BIG_ENDIAN 4321
+
+#ifdef _LITTLE_ENDIAN
+#define __BYTE_ORDER __LITTLE_ENDIAN
+
+#else // default to big endian
+#define __BYTE_ORDER __BIG_ENDIAN
+#endif
+
#else
#include <endian.h>
#include <byteswap.h>
--------------020909010703070707030508--
Home |
Main Index |
Thread Index |
Old Index