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))
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to