From cefa06cd6967f2c2db2acfb54a4bf3be398a3ce8 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Tue, 7 Jan 2014 14:23:49 -0800 Subject: [PATCH] egl: Add STATIC_ASSERT() macro Signed-off-by: Chad Versace --- src/egl/main/eglcompiler.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/egl/main/eglcompiler.h b/src/egl/main/eglcompiler.h index 2499172a1c5..53dab54384a 100644 --- a/src/egl/main/eglcompiler.h +++ b/src/egl/main/eglcompiler.h @@ -89,4 +89,9 @@ # define __FUNCTION__ __func__ #endif +#define STATIC_ASSERT(COND) \ + do { \ + (void) sizeof(char [1 - 2*!(COND)]); \ + } while (0) + #endif /* EGLCOMPILER_INCLUDED */ -- 2.30.2