diff options
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/configure.in b/source3/configure.in index fc66c17425..2ae5e35295 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2795,9 +2795,17 @@ AC_CACHE_CHECK([if the realpath function allows a NULL argument],samba_cv_REALPA AC_TRY_RUN([ #include <stdio.h> #include <limits.h> +#include <signal.h> + +void exit_on_core(int ignored) { + exit(1); +} + main() { - char *newpath = realpath("/tmp", NULL); - exit ((newpath != NULL) ? 0 : 1); + char *newpath; + signal(SIGSEGV, exit_on_core); + newpath = realpath("/tmp", NULL); + exit((newpath != NULL) ? 0 : 1); } ], samba_cv_REALPATH_TAKES_NULL=yes,samba_cv_REALPATH_TAKES_NULL=no,samba_cv_REALPATH_TAKES_NULL=cross)]) |