From: Zach Loafman Date: Thu, 10 Jul 2008 18:45:48 +0000 (+0000) Subject: Fix realpath() check so that it doesn't generate a core() when it fails. X-Git-Url: http://git.samba.org/samba.git/?p=jra%2Fsamba%2F.git;a=commitdiff_plain;h=55f676550a909fddfb3b79a4aaa7aef4286dcd11 Fix realpath() check so that it doesn't generate a core() when it fails. (This used to be commit 5fdbf89c898efff57c65061ea2c360d2cd91bcec) --- diff --git a/source3/configure.in b/source3/configure.in index fc66c17425c..2ae5e35295d 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)])