Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet Fix dtrace build error with gcc 4.8 on i...
details: https://anonhg.NetBSD.org/src/rev/905a0d098d8c
branches: trunk
changeset: 336250:905a0d098d8c
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Sat Feb 21 15:00:30 2015 +0000
description:
Fix dtrace build error with gcc 4.8 on i386 and arm
_ILP32 is required by dt_popc.
The fix is inspired by FreeBSD.
diffstat:
external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c | 1 +
external/cddl/osnet/sys/sys/isa_defs.h | 21 ++++++++++++++++-
2 files changed, 21 insertions(+), 1 deletions(-)
diffs (43 lines):
diff -r 8578c4f9fe26 -r 905a0d098d8c external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c
--- a/external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c Sat Feb 21 12:50:23 2015 +0000
+++ b/external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c Sat Feb 21 15:00:30 2015 +0000
@@ -48,6 +48,7 @@
#include <limits.h>
#include <paths.h>
+#include <sys/isa_defs.h>
#include <dt_impl.h>
static const struct {
diff -r 8578c4f9fe26 -r 905a0d098d8c external/cddl/osnet/sys/sys/isa_defs.h
--- a/external/cddl/osnet/sys/sys/isa_defs.h Sat Feb 21 12:50:23 2015 +0000
+++ b/external/cddl/osnet/sys/sys/isa_defs.h Sat Feb 21 15:00:30 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_defs.h,v 1.1 2009/08/07 20:57:57 haad Exp $ */
+/* $NetBSD: isa_defs.h,v 1.2 2015/02/21 15:00:30 ozaki-r Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,3 +30,22 @@
*/
#include <sys/types.h>
+
+#if defined(__i386__)
+#if !defined(_ILP32)
+#define _ILP32
+#endif
+
+#elif defined(__amd64__)
+#if !defined(_LP64)
+#define _LP64
+#endif
+
+#elif defined(__arm__)
+#if !defined(_ILP32)
+#define _ILP32
+#endif
+
+#else
+#error "architecture not supported"
+#endif
Home |
Main Index |
Thread Index |
Old Index