Просмотр исходного кода

libuv: fix compilation with macOS 10.10 SDK

The `F_BARRIERFSYNC` constant was not added until the macOS 10.11 SDK.
Hard-code its value instead.  This approach is backported from upstream
libuv PR 2334.
Brad King 6 лет назад
Родитель
Сommit
db4667cc72
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Utilities/cmlibuv/src/unix/fs.c

+ 1 - 1
Utilities/cmlibuv/src/unix/fs.c

@@ -168,7 +168,7 @@ static ssize_t uv__fs_fsync(uv_fs_t* req) {
 
   r = fcntl(req->file, F_FULLFSYNC);
   if (r != 0)
-    r = fcntl(req->file, F_BARRIERFSYNC);  /* fsync + barrier */
+    r = fcntl(req->file, 85 /* F_BARRIERFSYNC */);  /* fsync + barrier */
   if (r != 0)
     r = fsync(req->file);
   return r;