aboutsummaryrefslogtreecommitdiff
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 07652cf163..b5cf84cf6e 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -54,6 +54,9 @@
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <qemu-common.h>
+#ifdef HAVE_GPROF
+#include <sys/gmon.h>
+#endif
#define termios host_termios
#define winsize host_winsize
@@ -4864,6 +4867,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
#ifdef __NR_exit_group
/* new thread calls */
case TARGET_NR_exit_group:
+#ifdef HAVE_GPROF
+ _mcleanup();
+#endif
gdb_exit(cpu_env, arg1);
ret = get_errno(exit_group(arg1));
break;