From f144e50f5ca65ba67c23ff262a79c35a2c444006 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 8 Nov 2016 16:22:40 +0530 Subject: has_function: Cast to void* instead of int Clang++ doesn't allow that, but void* will always be allowed because lots of projects depend on that. error: cast from pointer to smaller type 'int' loses information --- mesonbuild/compilers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index 9b6ad8c..53d298a 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -930,7 +930,7 @@ int main(int argc, char **argv) { head = '#include \n{0}\n' # We don't know what the function takes or returns, so try to use it as # a function pointer - main = '\nint main() {{ int a = (int) &{1}; }}' + main = '\nint main() {{ void *a = (void*) &{1}; }}' return head, main def has_function(self, funcname, prefix, env, extra_args=None, dependencies=None): -- cgit v1.1