diff -ur asterisk-11.5.1/apps/app_dahdiras.c asterisk-11.5.1-cpy/apps/app_dahdiras.c --- asterisk-11.5.1/apps/app_dahdiras.c 2012-03-01 23:09:18.000000000 +0100 +++ asterisk-11.5.1-cpy/apps/app_dahdiras.c 2013-09-19 11:17:45.305139821 +0200 @@ -150,7 +150,7 @@ ast_log(LOG_WARNING, "Failed to spawn RAS\n"); } else { for (;;) { - res = wait4(pid, &status, WNOHANG, NULL); + res = waitpid(pid, &status, WNOHANG); if (!res) { /* Check for hangup */ if (ast_check_hangup(chan) && !signalled) { @@ -163,7 +163,7 @@ continue; } if (res < 0) { - ast_log(LOG_WARNING, "wait4 returned %d: %s\n", res, strerror(errno)); + ast_log(LOG_WARNING, "waitpid returned %d: %s\n", res, strerror(errno)); } if (WIFEXITED(status)) { ast_verb(3, "RAS on %s terminated with status %d\n", ast_channel_name(chan), WEXITSTATUS(status)); diff -ur asterisk-11.5.1/main/asterisk.c asterisk-11.5.1-cpy/main/asterisk.c --- asterisk-11.5.1/main/asterisk.c 2013-01-21 21:40:13.000000000 +0100 +++ asterisk-11.5.1-cpy/main/asterisk.c 2013-09-19 11:16:34.957049579 +0200 @@ -1083,7 +1083,6 @@ { pid_t pid; int res; - struct rusage rusage; int status; #if defined(HAVE_WORKING_FORK) || defined(HAVE_WORKING_VFORK) @@ -1115,7 +1114,7 @@ _exit(1); } else if (pid > 0) { for (;;) { - res = wait4(pid, &status, 0, &rusage); + res = waitpid(pid, &status, 0); if (res > -1) { res = WIFEXITED(status) ? WEXITSTATUS(status) : -1; break; @@ -1601,7 +1600,7 @@ /* * Reap all dead children -- not just one */ - for (n = 0; wait4(-1, &status, WNOHANG, NULL) > 0; n++) + for (n = 0; waitpid(-1, &status, WNOHANG) > 0; n++) ; if (n == 0 && option_debug) printf("Huh? Child handler, but nobody there?\n"); diff -ur asterisk-11.5.1/utils/extconf.c asterisk-11.5.1-cpy/utils/extconf.c --- asterisk-11.5.1/utils/extconf.c 2012-11-16 01:09:34.000000000 +0100 +++ asterisk-11.5.1-cpy/utils/extconf.c 2013-09-19 11:17:03.045085664 +0200 @@ -1315,7 +1315,6 @@ int x; #endif int res; - struct rusage rusage; int status; #if defined(HAVE_WORKING_FORK) || defined(HAVE_WORKING_VFORK) @@ -1337,7 +1336,7 @@ _exit(1); } else if (pid > 0) { for(;;) { - res = wait4(pid, &status, 0, &rusage); + res = waitpid(pid, &status, 0); if (res > -1) { res = WIFEXITED(status) ? WEXITSTATUS(status) : -1; break;