projects
/
platform
/
upstream
/
dbus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[daemon-fix] Registering starters: unwanted release_kdbus_name when no error was...
[platform/upstream/dbus.git]
/
test
/
test-segfault.c
diff --git
a/test/test-segfault.c
b/test/test-segfault.c
index
94b4274
..
329a21f
100644
(file)
--- a/
test/test-segfault.c
+++ b/
test/test-segfault.c
@@
-1,14
+1,20
@@
/* This is simply a process that segfaults */
/* This is simply a process that segfaults */
+#include <config.h>
+#include <stdlib.h>
+#ifdef HAVE_SIGNAL_H
#include <signal.h>
#include <signal.h>
+#endif
-#i
nclude <sys/time.h>
+#i
fdef HAVE_SETRLIMIT
#include <sys/resource.h>
#include <sys/resource.h>
+#endif
int
main (int argc, char **argv)
{
char *p;
int
main (int argc, char **argv)
{
char *p;
+#if HAVE_SETRLIMIT
struct rlimit r = { 0, };
getrlimit (RLIMIT_CORE, &r);
struct rlimit r = { 0, };
getrlimit (RLIMIT_CORE, &r);
@@
-16,8
+22,8
@@
main (int argc, char **argv)
setrlimit (RLIMIT_CORE, &r);
raise (SIGSEGV);
setrlimit (RLIMIT_CORE, &r);
raise (SIGSEGV);
-
- p =
0
;
+#endif
+ p =
NULL
;
*p = 'a';
return 0;
*p = 'a';
return 0;