]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Compilation workaround for windows, which lacks O_SYNC
authorNick Mathewson <nickm@torproject.org>
Fri, 16 Feb 2018 13:16:12 +0000 (08:16 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 16 Feb 2018 13:16:12 +0000 (08:16 -0500)
Bug not in any released Tor.

src/or/keypin.c

index 66525cbf9024fa8ea0506f822d01169b77aee5ad..52bdff816c99e2e6265ee2fc0436e8a4a7bef7b7 100644 (file)
@@ -289,6 +289,9 @@ static int keypin_journal_fd = -1;
 int
 keypin_open_journal(const char *fname)
 {
+#ifndef O_SYNC
+#define O_SYNC 0
+#endif
   int fd = tor_open_cloexec(fname, O_WRONLY|O_CREAT|O_BINARY|O_SYNC, 0600);
   if (fd < 0)
     goto err;