Fix the compiler attribute test to work with Clang.
[tinc] / m4 / attribute.m4
index 9d673e9..3228deb 100644 (file)
@@ -9,8 +9,8 @@ AC_DEFUN([tinc_ATTRIBUTE],
     CFLAGS="$CFLAGS -Wall -Werror"
     AC_COMPILE_IFELSE(
       [AC_LANG_SOURCE(
-        [void *test(void) __attribute__ (($1));
-        void *test(void) { return (void *)0; }
+        [void *test(void *x) __attribute__ (($1));
+        void *test(void *x) { return (void *)x; }
        ],
        )],
        [tinc_cv_attribute_$1=yes],