]> git.lizzy.rs Git - rust.git/commitdiff
Add no-op shim for posix_fadvise
authorDavid Cook <divergentdave@gmail.com>
Sun, 26 Jan 2020 21:10:01 +0000 (15:10 -0600)
committerDavid Cook <divergentdave@gmail.com>
Sun, 26 Jan 2020 21:10:01 +0000 (15:10 -0600)
src/shims/foreign_items.rs

index deeb37da44a3f08cebb62b68d73daaa40072ac08..7bd85a4e94d42c7602b65378f949afe339587d78 100644 (file)
@@ -780,6 +780,11 @@ fn emulate_foreign_item(
                 this.write_null(dest)?;
             }
 
+            "posix_fadvise" => {
+                // fadvise is only informational, we can ignore it.
+                this.write_null(dest)?;
+            }
+
             "mmap" => {
                 // This is a horrible hack, but since the guard page mechanism calls mmap and expects a particular return value, we just give it that value.
                 let addr = this.read_scalar(args[0])?.not_undef()?;