ports/devel/nspr/files/patch-.._pr_include_md__freebsd.h
Ed Schouten 13bb940da2 Add support for PowerPC to devel/nspr.
There were two things missing in the nspr port that prevented it from
being properly compiled on PowerPC:

- A string definition of the processor platform ("powerpc").

- Definitions of byte ordering and sizes of standard C types.

I copied the second list of definitions from _linux.cfg. The values used
by _openbsd.cfg and _netbsd.cfg are not accurate (size and alignment of
int64 is incorrect).

Approved by:	marcus
2008-11-04 07:11:16 +00:00

28 lines
708 B
C

--- ../pr/include/md/_freebsd.h
+++ ../pr/include/md/_freebsd.h
@@ -57,6 +57,8 @@
#define _PR_SI_ARCHITECTURE "ia64"
#elif defined(__amd64__)
#define _PR_SI_ARCHITECTURE "amd64"
+#elif defined(__powerpc__)
+#define _PR_SI_ARCHITECTURE "powerpc"
#else
#error "Unknown CPU architecture"
#endif
@@ -106,6 +108,16 @@
#define _PR_IPV6_V6ONLY_PROBE
#endif
+#if (__FreeBSD_version >= 700016) || (__FreeBSD_version < 700000 && __FreeBSD_version >= 601103)
+#if defined(_PR_PTHREADS)
+#define _PR_HAVE_GETPROTO_R
+#define _PR_HAVE_5_ARG_GETPROTO_R
+#define _PR_HAVE_GETHOST_R
+#define _PR_HAVE_GETHOST_R_INT
+#define _PR_HAVE_THREADSAFE_GETHOST
+#endif
+#endif
+
#define USE_SETJMP
#ifndef _PR_PTHREADS