isl: remove ffs function that conflicts with system headers
authorJonathan Gray <jsg@jsg.id.au>
Sat, 23 Apr 2016 07:27:58 +0000 (17:27 +1000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 25 Apr 2016 14:06:46 +0000 (15:06 +0100)
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@jsg.id.au>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/intel/isl/isl_priv.h

index 7b222594fd4c0f9ee5efac543b41531a7cfc2fb5..d98e7079541d9fa945d574a6a26181ce87f8271b 100644 (file)
@@ -24,6 +24,7 @@
 #pragma once
 
 #include <assert.h>
 #pragma once
 
 #include <assert.h>
+#include <strings.h>
 
 #include "brw_device_info.h"
 #include "util/macros.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))
 
 #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)
 {
 static inline bool
 isl_is_pow2(uintmax_t n)
 {