]> git.sesse.net Git - plocate/blobdiff - io_uring_engine.cpp
Remove dependency on non-POSIX header error.h.
[plocate] / io_uring_engine.cpp
index 116cf85f285ab15b1a85a6a39f59741271422e06..63a3af78a86256ad4469443e6f872b4f890a43bc 100644 (file)
@@ -46,7 +46,7 @@ IOUringEngine::IOUringEngine(size_t slop_bytes)
 #endif
 }
 
-void IOUringEngine::submit_stat(const char *path, std::function<void(bool)> cb)
+void IOUringEngine::submit_stat(const char *path [[maybe_unused]], std::function<void(bool)> cb [[maybe_unused]])
 {
        assert(supports_stat);
 
@@ -123,7 +123,7 @@ void IOUringEngine::submit_stat_internal(io_uring_sqe *sqe, char *path, std::fun
        pending->stat.pathname = path;
        pending->stat.buf = new struct statx;
 
-       io_uring_prep_statx(sqe, /*fd=*/-1, pending->stat.pathname, AT_STATX_SYNC_AS_STAT, STATX_MODE, pending->stat.buf);
+       io_uring_prep_statx(sqe, /*fd=*/-1, pending->stat.pathname, AT_STATX_SYNC_AS_STAT | AT_SYMLINK_NOFOLLOW, STATX_MODE, pending->stat.buf);
        io_uring_sqe_set_data(sqe, pending);
        ++pending_reads;
 }