瀏覽代碼

Compilation workaround for windows, which lacks O_SYNC

Bug not in any released Tor.
Nick Mathewson 7 年之前
父節點
當前提交
200fc8c640
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/or/keypin.c

+ 3 - 0
src/or/keypin.c

@@ -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;