Fix build under BeOS.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23386 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2008-01-11 11:22:47 +00:00
parent ffb64301bf
commit 9d666b8707
1 changed files with 6 additions and 0 deletions

View File

@ -79,9 +79,15 @@ TermApp::ReadyToRun()
// Install a SIGCHLD signal handler, so that we will be notified, when
// a shell exits.
struct sigaction action;
#ifdef __HAIKU__
action.sa_handler = (sighandler_t)_SigChildHandler;
#else
action.sa_handler = (__signal_func_ptr)_SigChildHandler;
#endif
sigemptyset(&action.sa_mask);
#ifdef SA_NODEFER
action.sa_flags = SA_NODEFER;
#endif
action.sa_userdata = this;
if (sigaction(SIGCHLD, &action, NULL) < 0) {
fprintf(stderr, "sigaction() failed: %s\n", strerror(errno));