diff options
-rw-r--r-- | include/mingw.h | 2 | ||||
-rw-r--r-- | win32/Kbuild | 1 | ||||
-rw-r--r-- | win32/process.c | 10 |
3 files changed, 12 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h index e59e6322c..70b679674 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -218,7 +218,7 @@ int setitimer(int type, struct itimerval *in, struct itimerval *out); | |||
218 | * sys/wait.h | 218 | * sys/wait.h |
219 | */ | 219 | */ |
220 | #define WNOHANG 1 | 220 | #define WNOHANG 1 |
221 | NOIMPL(waitpid,pid_t pid UNUSED_PARAM, int *status UNUSED_PARAM, unsigned options UNUSED_PARAM); | 221 | int waitpid(pid_t pid, int *status, unsigned options); |
222 | 222 | ||
223 | /* | 223 | /* |
224 | * time.h | 224 | * time.h |
diff --git a/win32/Kbuild b/win32/Kbuild index 85f5ca7c4..22f8252d0 100644 --- a/win32/Kbuild +++ b/win32/Kbuild | |||
@@ -6,3 +6,4 @@ lib-y:= | |||
6 | 6 | ||
7 | lib-$(CONFIG_PLATFORM_MINGW32) += fnmatch.o | 7 | lib-$(CONFIG_PLATFORM_MINGW32) += fnmatch.o |
8 | lib-$(CONFIG_PLATFORM_MINGW32) += mingw.o | 8 | lib-$(CONFIG_PLATFORM_MINGW32) += mingw.o |
9 | lib-$(CONFIG_PLATFORM_MINGW32) += process.o | ||
diff --git a/win32/process.c b/win32/process.c new file mode 100644 index 000000000..77d19fb9a --- /dev/null +++ b/win32/process.c | |||
@@ -0,0 +1,10 @@ | |||
1 | #include "libbb.h" | ||
2 | |||
3 | int waitpid(pid_t pid, int *status, unsigned options) | ||
4 | { | ||
5 | /* Windows does not understand parent-child */ | ||
6 | if (options == 0 && pid != -1) | ||
7 | return _cwait(status, pid, 0); | ||
8 | errno = EINVAL; | ||
9 | return -1; | ||
10 | } | ||