summaryrefslogtreecommitdiffstats
path: root/source/configure.in
diff options
context:
space:
mode:
authorZach Loafman <zachary.loafman@isilon.com>2008-07-10 18:45:48 +0000
committerJeremy Allison <jra@samba.org>2008-07-10 15:24:57 -0700
commit5fdbf89c898efff57c65061ea2c360d2cd91bcec (patch)
tree2a9158ce290b6af36a38e2ae98d767371e6e8a82 /source/configure.in
parent3d2913d599a4cd773614110ec7b7493aa7adb547 (diff)
downloadsamba-5fdbf89c898efff57c65061ea2c360d2cd91bcec.tar.gz
samba-5fdbf89c898efff57c65061ea2c360d2cd91bcec.tar.xz
samba-5fdbf89c898efff57c65061ea2c360d2cd91bcec.zip
Fix realpath() check so that it doesn't generate a core() when it fails.
Diffstat (limited to 'source/configure.in')
-rw-r--r--source/configure.in12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/configure.in b/source/configure.in
index fc66c17425c..2ae5e35295d 100644
--- a/source/configure.in
+++ b/source/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)])