util: Include string.h in bitscan.h.
authorVinson Lee <vlee@freedesktop.org>
Thu, 20 Oct 2016 01:03:12 +0000 (18:03 -0700)
committerVinson Lee <vlee@freedesktop.org>
Thu, 20 Oct 2016 21:54:28 +0000 (14:54 -0700)
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>
src/util/bitscan.h

index 8afef81a990afadd2e85f4e8fd23f02c5359152f..a5dfa1f9e3bf458a8dd4b4bee24b4f8bb38b7240 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <assert.h>
 #include <stdint.h>
+#include <string.h>
 
 #if defined(_MSC_VER)
 #include <intrin.h>