svn commit: r358707 - stable/12/sys/kern

Konstantin Belousov kib at FreeBSD.org
Fri Mar 6 15:57:23 UTC 2020


Author: kib
Date: Fri Mar  6 15:57:21 2020
New Revision: 358707
URL: https://svnweb.freebsd.org/changeset/base/358707

Log:
  Adjust r358702 by dropping type asserts.
  
  They depend on the C11 Generic feature that is not supported by gcc 4.2.1
  used on stable/12 for some arches.
  
  This is a direct commit to the branch.
  
  Reported by:	gjb
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/12/sys/kern/kern_tc.c

Modified: stable/12/sys/kern/kern_tc.c
==============================================================================
--- stable/12/sys/kern/kern_tc.c	Fri Mar  6 15:26:15 2020	(r358706)
+++ stable/12/sys/kern/kern_tc.c	Fri Mar  6 15:57:21 2020	(r358707)
@@ -234,9 +234,11 @@ bintime_off(struct bintime *bt, u_int off)
 }
 #define	GETTHBINTIME(dst, member)					\
 do {									\
+/*									\
 	_Static_assert(_Generic(((struct timehands *)NULL)->member,	\
 	    struct bintime: 1, default: 0) == 1,			\
 	    "struct timehands member is not of struct bintime type");	\
+*/									\
 	bintime_off(dst, __offsetof(struct timehands, member));		\
 } while (0)
 
@@ -255,10 +257,12 @@ getthmember(void *out, size_t out_size, u_int off)
 }
 #define	GETTHMEMBER(dst, member)					\
 do {									\
+/*									\
 	_Static_assert(_Generic(*dst,					\
 	    __typeof(((struct timehands *)NULL)->member): 1,		\
 	    default: 0) == 1,						\
 	    "*dst and struct timehands member have different types");	\
+*/									\
 	getthmember(dst, sizeof(*dst), __offsetof(struct timehands,	\
 	    member));							\
 } while (0)


More information about the svn-src-stable mailing list