Mesa (master): util: Add strings.h include on unices

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Dec 9 20:18:26 UTC 2011


Module: Mesa
Branch: master
Commit: c83fb4d45f2a47042f395271efe6e5489b2c4aee
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c83fb4d45f2a47042f395271efe6e5489b2c4aee

Author: José Fonseca <jfonseca at vmware.com>
Date:   Fri Dec  9 20:05:27 2011 +0000

util: Add strings.h include on unices

Fixes -Wimplicit-function-declaration for ffs with GCC.  Spotted/tested
by Kai Wasserbäch.

---

 src/gallium/auxiliary/util/u_math.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
index f908341..404bd21 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -51,6 +51,10 @@ extern "C" {
 #include <math.h>
 #include <stdarg.h>
 
+#ifdef PIPE_OS_UNIX
+#include <strings.h> /* for ffs */
+#endif
+
 
 #ifndef M_SQRT2
 #define M_SQRT2 1.41421356237309504880




More information about the mesa-commit mailing list