aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 7721aea6..bac4a68d 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -575,6 +575,9 @@ int main(int argc, char **argv)
signal(SIGQUIT, terminate_run);
/* here's the exclusion lock */
+#ifndef O_SYNC
+#define O_SYNC 0 /* use it if we have it */
+#endif
if ((st = open(lockfile, O_WRONLY|O_CREAT|O_EXCL|O_SYNC, 0666)) != -1)
{
sprintf(tmpbuf,"%d", getpid());