From 55f676550a909fddfb3b79a4aaa7aef4286dcd11 Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Thu, 10 Jul 2008 18:45:48 +0000 Subject: Fix realpath() check so that it doesn't generate a core() when it fails. (This used to be commit 5fdbf89c898efff57c65061ea2c360d2cd91bcec) --- source3/configure.in | 12 ++++++++++-- 1 file 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 #include +#include + +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)]) -- cgit