Mesa (master): isl: remove ffs function that conflicts with system headers

Emil Velikov evelikov at kemper.freedesktop.org
Mon Apr 25 14:10:22 UTC 2016


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

Author: Jonathan Gray <jsg at jsg.id.au>
Date:   Sat Apr 23 17:27:58 2016 +1000

isl: remove ffs function that conflicts with system headers

Remove a wrapper around __builtin_ffs that conflicts with system
headers on OpenBSD and perhaps elsewhere:

isl_priv.h:44: error: conflicting types for 'ffs'

v2: include strings.h to ensure prototype is found

Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

---

 src/intel/isl/isl_priv.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/intel/isl/isl_priv.h b/src/intel/isl/isl_priv.h
index 7b22259..d98e707 100644
--- a/src/intel/isl/isl_priv.h
+++ b/src/intel/isl/isl_priv.h
@@ -24,6 +24,7 @@
 #pragma once
 
 #include <assert.h>
+#include <strings.h>
 
 #include "brw_device_info.h"
 #include "util/macros.h"
@@ -39,11 +40,6 @@ __isl_finishme(const char *file, int line, const char *fmt, ...);
 #define MIN(a, b) ((a) < (b) ? (a) : (b))
 #define MAX(a, b) ((a) > (b) ? (a) : (b))
 
-static inline uint32_t
-ffs(uint32_t n) {
-   return __builtin_ffs(n);
-}
-
 static inline bool
 isl_is_pow2(uintmax_t n)
 {




More information about the mesa-commit mailing list