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: Sat, 28 Sep 2019 12:05:27 -0700

 	hello Robert Elz suggested a better patch which I've partially
 implemented and tested. Here it is.
 If there are no objections, I'll commit this when the process is complete.
 -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 19:00:59 -0000
 @@ -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.
 + */
 +#ifndef __CTASSERT
 +#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 /* __CTASSERT */
  #endif
  #if HAVE_SYS_SYSLIMITS_H
  #include <sys/syslimits.h>
 


Home | Main Index | Thread Index | Old Index