ttls chbind: update VSA to use
[freeradius.git] / acinclude.m4
index 5043e2b..2730606 100644 (file)
@@ -349,6 +349,9 @@ dnl
 
   AC_TRY_COMPILE([
 $1
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
 #ifndef offsetof
 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
 #endif
@@ -383,7 +386,7 @@ m4_pushdef([AC_OUTPUT],
 AC_DEFUN([FR_TLS],
 [
     AC_MSG_CHECKING(for TLS)
-    AC_RUN_IFELSE([AC_LANG_SOURCE([[ static __thread int val; int main() { return 0; } ]])],[have_tls=yes],[have_tls=no],[have_tls=no ])
+    AC_RUN_IFELSE([AC_LANG_SOURCE([[ static __thread int val; int main(int argc, char *argv[]) { return val = argc; } ]])],[have_tls=yes],[have_tls=no],[have_tls=no ])
     AC_MSG_RESULT($have_tls)
     if test "$have_tls" = "yes"; then
         AC_DEFINE([HAVE_THREAD_TLS],[1],[Define if the compiler supports __thread])