diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-07-26 16:43:36 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-07-26 16:43:36 +0400 |
commit | 2e615083e475c7390c667695b9e659fa5ba4da5f (patch) | |
tree | 2daf15c394a5e2c4fa9209ebed3c371419bfb522 /src | |
parent | 0d35a8f9cb4942e84d3e26ca4d010393a56e2904 (diff) | |
download | rspamd-2e615083e475c7390c667695b9e659fa5ba4da5f.tar.gz rspamd-2e615083e475c7390c667695b9e659fa5ba4da5f.zip |
Fix build on FreeBSD 9.1 and Current. Thanks to Anton Yuzjaninov for testing.
Diffstat (limited to 'src')
-rw-r--r-- | src/util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c index ab81a28a5..a6c56ea95 100644 --- a/src/util.c +++ b/src/util.c @@ -408,7 +408,11 @@ write_pid (struct rspamd_main *main) if (main->is_privilleged) { /* Force root user as owner of pid file */ +#ifdef HAVE_PIDFILE_FILENO + if (fchown (pidfile_fileno (main->pfh), 0, 0) == -1) { +#else if (fchown (main->pfh->pf_fd, 0, 0) == -1) { +#endif msg_err ("cannot chown of pidfile %s to 0:0 user", main->cfg->pid_file); } } |