# # # patch "configure.ac" # from [7b692d1a4c042e4bb273eaec736c8970eae703c3] # to [c24631ee4274b75a877ea5a65edba094ab7c51d2] # # patch "unix/daemon.cc" # from [f10672e1d501272a8c4c5027ed639f7de10d0ab8] # to [fedc57fadc85d1270a29da8e7c113abbaff7f2e0] # ============================================================ --- configure.ac 7b692d1a4c042e4bb273eaec736c8970eae703c3 +++ configure.ac c24631ee4274b75a877ea5a65edba094ab7c51d2 @@ -120,7 +120,7 @@ AC_CHECK_FUNCS([atexit memset mkstemp st AC_FUNC_ICONV_TRANSLIT AC_CHECK_FUNCS([atexit memset mkstemp strptime lrint \ __cxa_current_exception_type __cxa_demangle \ - putenv setenv unsetenv dirfd fstatat mkdtemp daemon]) + putenv setenv unsetenv dirfd fstatat mkdtemp daemon setsid]) # simple library checks AC_SEARCH_LIBS([deflate], [z], , AC_MSG_FAILURE([zlib is required])) ============================================================ --- unix/daemon.cc f10672e1d501272a8c4c5027ed639f7de10d0ab8 +++ unix/daemon.cc fedc57fadc85d1270a29da8e7c113abbaff7f2e0 @@ -15,22 +15,19 @@ */ #include - -#ifdef HAVE_DAEMON -int mtn_daemon(int nochdir, int noclose) -{ - return(daemon(nochdir, noclose)); -} -#else - +#ifndef HAVE_DAEMON #include #include #include #include #include +#endif int mtn_daemon(int nochdir, int noclose) { +#ifdef HAVE_DAEMON + return(daemon(nochdir, noclose)); +#else int fd; int rc; @@ -110,5 +107,5 @@ int mtn_daemon(int nochdir, int noclose) } return 0; +#endif //have_daemon } -#endif