drm: Branch 'master'

[email protected] (GitLab Mirror) Wed, 5 Sep 2018 12:11:18 +0000 (UTC)
Newsgroups gmane.comp.video.dri.patches
Message-ID <[email protected]>
 util_math.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b06d71bb2244d20ee3643c47c0de5f9d98b99ef5
Author: Tom Anderson <[email protected]>
Date:   Wed Jul 25 12:06:29 2018 -0700

    Fix build with -std=c11
    
    typeof() is a GNU extension that will only work when the compiler is passed
    -std=gnu*.  __typeof__() works with -std=c*, however.
    Reviewed-by: Eric Engestrom <[email protected]>

diff --git a/util_math.h b/util_math.h
index 02b15a8e..35bf4512 100644
--- a/util_math.h
+++ b/util_math.h
@@ -29,6 +29,6 @@
 #define MAX3( A, B, C ) ((A) > (B) ? MAX2(A, C) : MAX2(B, C))
 
 #define __align_mask(value, mask)  (((value) + (mask)) & ~(mask))
-#define ALIGN(value, alignment)    __align_mask(value, (typeof(value))((alignment) - 1))
+#define ALIGN(value, alignment)    __align_mask(value, (__typeof__(value))((alignment) - 1))
 
 #endif /*_UTIL_MATH_H_*/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--