summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2016-10-19 18:03:12 -0700
committerEmil Velikov <emil.l.velikov@gmail.com>2016-11-01 13:21:51 +0000
commit5ef25047592ad67222e2473e5511db577659dc21 (patch)
tree78b403618f9b88b67b0aefe96df0b55a0f712fbc
parent8daa9b33c02ad76ecbdcc96796ae1786b6b8047f (diff)
util: Include string.h in bitscan.h.
Fix build error with clang. Compiling src/compiler/glsl/link_varyings.cpp ... In file included from src/compiler/glsl/link_varyings.cpp:33: In file included from src/compiler/glsl/glsl_symbol_table.h:34: In file included from src/compiler/glsl/ir.h:33: In file included from src/compiler/glsl_types.h:29: /usr/include/string.h:518:12: error: exception specification in declaration does not match previous declaration extern int ffs (int __i) __THROW __attribute__ ((__const__)); ^ src/util/bitscan.h:51:13: note: expanded from macro 'ffs' ^ src/util/bitscan.h:96:18: note: previous declaration is here const int i = ffs(*mask) - 1; ^ src/util/bitscan.h:51:13: note: expanded from macro 'ffs' ^ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97952 Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> (cherry picked from commit 889ee4da05400687a6c5296a7632dc26f1d61924)
-rw-r--r--src/util/bitscan.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/bitscan.h b/src/util/bitscan.h
index 8afef81a990..a5dfa1f9e3b 100644
--- a/src/util/bitscan.h
+++ b/src/util/bitscan.h
@@ -31,6 +31,7 @@
#include <assert.h>
#include <stdint.h>
+#include <string.h>
#if defined(_MSC_VER)
#include <intrin.h>