From 110a30ea28e94852df3f70d28e1ea2248b25915d Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Wed, 13 Sep 2017 15:09:49 +0700 Subject: [PATCH] Determine if rad_fork/rad_waitpid definitions are actually needed --- src/main/radattr.c | 12 ------------ src/main/radmin.c | 11 ----------- src/main/radwho.c | 11 ----------- src/tests/map/map_unit.c | 14 -------------- 4 files changed, 48 deletions(-) diff --git a/src/main/radattr.c b/src/main/radattr.c index 3badef98c499..f688f13b8368 100644 --- a/src/main/radattr.c +++ b/src/main/radattr.c @@ -44,18 +44,6 @@ typedef struct REQUEST REQUEST; extern log_lvl_t rad_debug_lvl; #include -pid_t rad_fork(void); -pid_t rad_waitpid(pid_t pid, int *status); - -pid_t rad_fork(void) -{ - return fork(); -} - -pid_t rad_waitpid(pid_t pid, int *status) -{ - return waitpid(pid, status, 0); -} static ssize_t xlat_test(UNUSED void *instance, UNUSED REQUEST *request, UNUSED char const *fmt, UNUSED char *out, UNUSED size_t outlen) diff --git a/src/main/radmin.c b/src/main/radmin.c index c9d3be9303b5..30d1a0b8d3bf 100644 --- a/src/main/radmin.c +++ b/src/main/radmin.c @@ -84,17 +84,6 @@ static bool echo = false; static char const *secret = "testing123"; #include -pid_t rad_fork(void) -{ - return fork(); -} - -#ifdef HAVE_PTHREAD_H -pid_t rad_waitpid(pid_t pid, int *status) -{ - return waitpid(pid, status, 0); -} -#endif static void NEVER_RETURNS usage(int status) { diff --git a/src/main/radwho.c b/src/main/radwho.c index e169a47086d9..63be3a964294 100644 --- a/src/main/radwho.c +++ b/src/main/radwho.c @@ -62,17 +62,6 @@ bool log_stripped_names; main_config_t main_config; #include -pid_t rad_fork(void) -{ - return fork(); -} - -#ifdef HAVE_PTHREAD_H -pid_t rad_waitpid(pid_t pid, int *status) -{ - return waitpid(pid, status, 0); -} -#endif static struct radutmp_config_t { char const *radutmp_fn; diff --git a/src/tests/map/map_unit.c b/src/tests/map/map_unit.c index af6d016a5ab8..b91ab5d727e1 100644 --- a/src/tests/map/map_unit.c +++ b/src/tests/map/map_unit.c @@ -40,20 +40,6 @@ RCSID("$Id$") #include -/* Linker hacks */ - -#ifdef HAVE_PTHREAD_H -pid_t rad_fork(void) -{ - return fork(); -} - -pid_t rad_waitpid(pid_t pid, int *status) -{ - return waitpid(pid, status, 0); -} -#endif - rlm_rcode_t indexed_modcall(UNUSED rlm_components_t comp, UNUSED int idx, UNUSED REQUEST *request) { return RLM_MODULE_OK;