Title: [278507] branches/safari-611-branch/Source/WTF
Revision
278507
Author
[email protected]
Date
2021-06-04 15:45:47 -0700 (Fri, 04 Jun 2021)

Log Message

Cherry-pick r278209. rdar://problem/78595584

Modified Paths

Diff

Modified: branches/safari-611-branch/Source/WTF/ChangeLog (278506 => 278507)


--- branches/safari-611-branch/Source/WTF/ChangeLog	2021-06-04 22:45:44 UTC (rev 278506)
+++ branches/safari-611-branch/Source/WTF/ChangeLog	2021-06-04 22:45:47 UTC (rev 278507)
@@ -1,5 +1,31 @@
 2021-05-28  Russell Epstein  <[email protected]>
 
+Cherry-pick r278209. rdar://problem/78595584
+
+    Unreviewed build fix after r277881.
+    
+    Deal with IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES potentially not being defined on
+    older OSes.
+    
+    * wtf/cocoa/FileSystemCocoa.mm:
+    (WTF::FileSystemImpl::setAllowsMaterializingDatalessFiles):
+    (WTF::FileSystemImpl::allowsMaterializingDatalessFiles):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-05-28  Chris Dumez  <[email protected]>
+
+            Unreviewed build fix after r277881.
+
+            Deal with IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES potentially not being defined on
+            older OSes.
+
+            * wtf/cocoa/FileSystemCocoa.mm:
+            (WTF::FileSystemImpl::setAllowsMaterializingDatalessFiles):
+            (WTF::FileSystemImpl::allowsMaterializingDatalessFiles):
+
+2021-05-28  Russell Epstein  <[email protected]>
+
 Cherry-pick r278208. rdar://problem/78595584
 
     Unreviewed build fix after r277881.

Modified: branches/safari-611-branch/Source/WTF/wtf/cocoa/FileSystemCocoa.mm (278506 => 278507)


--- branches/safari-611-branch/Source/WTF/wtf/cocoa/FileSystemCocoa.mm	2021-06-04 22:45:44 UTC (rev 278506)
+++ branches/safari-611-branch/Source/WTF/wtf/cocoa/FileSystemCocoa.mm	2021-06-04 22:45:47 UTC (rev 278507)
@@ -196,15 +196,20 @@
 
 bool setAllowsMaterializingDatalessFiles(bool allow, PolicyScope scope)
 {
+#ifdef IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES
     if (setiopolicy_np(IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES, toIOPolicyScope(scope), allow ? IOPOL_MATERIALIZE_DATALESS_FILES_ON : IOPOL_MATERIALIZE_DATALESS_FILES_OFF) == -1) {
         LOG_ERROR("FileSystem::setAllowsMaterializingDatalessFiles(%d): setiopolicy_np call failed, errno: %d", allow, errno);
         return false;
     }
     return true;
+#else
+    return false;
+#endif
 }
 
 Optional<bool> allowsMaterializingDatalessFiles(PolicyScope scope)
 {
+#ifdef IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES
     int ret = getiopolicy_np(IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES, toIOPolicyScope(scope));
     if (ret == IOPOL_MATERIALIZE_DATALESS_FILES_ON)
         return true;
@@ -212,6 +217,9 @@
         return false;
     LOG_ERROR("FileSystem::allowsMaterializingDatalessFiles(): getiopolicy_np call failed, errno: %d", errno);
     return WTF::nullopt;
+#else
+    return WTF::nullopt;
+#endif
 }
 
 #if PLATFORM(IOS_FAMILY)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to