X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=test%2Ftest-segfault.c;h=329a21fd0819d0e4258342c26d24030a5837d8be;hb=1200c464b6c9051340960e07f0d61a51dad71286;hp=94b42749c39b61d428d835e1074290288b6e1b30;hpb=496f1e18a95604ee9008d4a01d50248d0c5532fb;p=platform%2Fupstream%2Fdbus.git diff --git a/test/test-segfault.c b/test/test-segfault.c index 94b4274..329a21f 100644 --- a/test/test-segfault.c +++ b/test/test-segfault.c @@ -1,14 +1,20 @@ /* This is simply a process that segfaults */ +#include +#include +#ifdef HAVE_SIGNAL_H #include +#endif -#include +#ifdef HAVE_SETRLIMIT #include +#endif int main (int argc, char **argv) { char *p; +#if HAVE_SETRLIMIT struct rlimit r = { 0, }; getrlimit (RLIMIT_CORE, &r); @@ -16,8 +22,8 @@ main (int argc, char **argv) setrlimit (RLIMIT_CORE, &r); raise (SIGSEGV); - - p = 0; +#endif + p = NULL; *p = 'a'; return 0;