NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: misc/54581: Issues building NetBSD-9 under NetBSD-5.2
The following reply was made to PR misc/54581; it has been noted by GNATS.
From: Brian Buhrow <buhrow%nfbcal.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: buhrow%nfbcal.org@localhost
Subject: Re: misc/54581: Issues building NetBSD-9 under NetBSD-5.2
Date: Fri, 27 Sep 2019 17:27:52 -0700
hello. Here is a better patch that allows us to get past the first
build issue. What do folks think of this?
-thanks
-Brian
Index: compat_defs.h
===================================================================
RCS file: /cvsroot/src/tools/compat/compat_defs.h,v
retrieving revision 1.116
diff -u -r1.116 compat_defs.h
--- compat_defs.h 19 Jun 2019 23:33:07 -0000 1.116
+++ compat_defs.h 28 Sep 2019 00:22:42 -0000
@@ -1,4 +1,4 @@
-/* $NetBSD$ */
+/* $NetBSD: compat_defs.h,v 1.116 2019/06/19 23:33:07 kamil Exp $ */
#ifndef __NETBSD_COMPAT_DEFS_H__
#define __NETBSD_COMPAT_DEFS_H__
@@ -118,6 +118,15 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
+/*
+ * __CTASSERT isn't defined until NetBSD-6, allow builds that want it
+ * to build on NetBSD-5 and older.
+ */
+#if (defined(__NetBSD_Version__) && __NetBSD_Version__ < 600000000)
+#define __CTASSERT(x) __CTASSERT0(x, __ctassert, __LINE__)
+#define __CTASSERT0(x, y, z) __CTASSERT1(x, y, z)
+#define __CTASSERT1(x, y, z) typedef char y ## z[/*CONSTCOND*/(x) ? 1 : -1]
+#endif /*__NetBSD__*/
#endif
#if HAVE_SYS_SYSLIMITS_H
#include <sys/syslimits.h>
Home |
Main Index |
Thread Index |
Old Index