Add check for fork(), which is missing on MinGW

* src/daemon.cc
* configure.ac
pull/1/head
Ross Smith II 2009-09-23 21:35:10 +00:00
parent 909b126180
commit 263aebc558
3 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2009-09-23 Ross Smith II <aria2spam at smithii dot com>
Add check for fork(), which is missing on MinGW
* src/daemon.cc
* configure.ac
2009-09-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed unused methods Util::fileCopy(), Util::rangedFileCopy(),

View File

@ -259,6 +259,7 @@ AC_CHECK_FUNCS([__argz_count \
__argz_next \
__argz_stringify \
atexit \
fork \
ftruncate \
getcwd \
gethostbyaddr \

View File

@ -43,6 +43,7 @@ namespace aria2 {
int daemon(int nochdir, int noclose)
{
pid_t pid;
#ifdef HAVE_FORK
pid = fork();
if(pid == -1) {
return -1;
@ -74,6 +75,7 @@ int daemon(int nochdir, int noclose)
return -1;
}
}
#endif // HAVE_FORK
return 0;
}