]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
cmake: check for the necessary symbols for test-segfault.c
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 20 Feb 2015 16:00:30 +0000 (16:00 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 20 Feb 2015 20:50:17 +0000 (20:50 +0000)
If we don't check for them, and you have core dumps enabled, then
running this test under cmake is really annoying, because it leaves
lots of core dumps none of which are actually a problem.

The equivalent Autotools change (which added the actual code that
this relies on) is commit ae50d46, from fd.o#83772.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83115
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
cmake/ConfigureChecks.cmake

index 6e8ebaeed99222c1f41a129c61185efaa3c74f58..06bd186faec64ae46e8c9adb1a48a5d1b7a0fc0b 100644 (file)
@@ -19,6 +19,7 @@ check_include_file(signal.h     HAVE_SIGNAL_H)
 check_include_file(locale.h     HAVE_LOCALE_H)
 check_include_file(inttypes.h     HAVE_INTTYPES_H)   # dbus-pipe.h
 check_include_file(stdint.h     HAVE_STDINT_H)   # dbus-pipe.h
+check_include_file(sys/prctl.h  HAVE_SYS_PRCTL_H)
 
 check_symbol_exists(backtrace    "execinfo.h"       HAVE_BACKTRACE)          #  dbus-sysdeps.c, dbus-sysdeps-win.c
 check_symbol_exists(getgrouplist "grp.h"            HAVE_GETGROUPLIST)       #  dbus-sysdeps.c
@@ -42,6 +43,8 @@ check_symbol_exists(accept4      "sys/socket.h"             HAVE_ACCEPT4)
 check_symbol_exists(dirfd        "dirent.h"                 HAVE_DIRFD)
 check_symbol_exists(inotify_init1 "sys/inotify.h"           HAVE_INOTIFY_INIT1)
 check_symbol_exists(SCM_RIGHTS    "sys/types.h;sys/socket.h;sys/un.h" HAVE_UNIX_FD_PASSING)
+check_symbol_exists(prctl        "sys/prctl.h"              HAVE_PRCTL)
+check_symbol_exists(raise        "signal.h"                 HAVE_RAISE)
 
 check_struct_member(cmsgcred cmcred_pid "sys/types.h sys/socket.h" HAVE_CMSGCRED)   #  dbus-sysdeps.c