Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Mar 2018 19:42:50 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330408 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201803041942.w24Jgobe033224@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Sun Mar  4 19:42:50 2018
New Revision: 330408
URL: https://svnweb.freebsd.org/changeset/base/330408

Log:
  Properly wrap the BUILD_BUG() function macro in the LinuxKPI.
  
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/kernel.h

Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/kernel.h	Sun Mar  4 19:32:52 2018	(r330407)
+++ head/sys/compat/linuxkpi/common/include/linux/kernel.h	Sun Mar  4 19:42:50 2018	(r330408)
@@ -86,7 +86,7 @@
 #define	S64_C(x) x ## LL
 #define	U64_C(x) x ## ULL
 
-#define	BUILD_BUG()			CTASSERT(0)
+#define	BUILD_BUG()			do { CTASSERT(0); } while (0)
 #define	BUILD_BUG_ON(x)			CTASSERT(!(x))
 #define	BUILD_BUG_ON_MSG(x, msg)	BUILD_BUG_ON(x)
 #define	BUILD_BUG_ON_NOT_POWER_OF_2(x)	BUILD_BUG_ON(!powerof2(x))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803041942.w24Jgobe033224>