]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10054 lmdb: more for prev commit
authorHoward Chu <hyc@openldap.org>
Wed, 15 Apr 2026 14:24:01 +0000 (15:24 +0100)
committerHoward Chu <hyc@openldap.org>
Wed, 15 Apr 2026 14:24:01 +0000 (15:24 +0100)
libraries/liblmdb/mdb.c

index c785f13042b747dd943fd027ef1f9a00a5b08850..6247f867ab8315f1eb47e2e23169ff26f301ce69 100644 (file)
@@ -4194,9 +4194,6 @@ retry_write:
                                }
                                async_i++;
 #else /* _WIN32 */
-#ifdef MDB_USE_PWRITEV
-                               wres = pwritev(fd, iov, n, wpos);
-#else
                                if (n == 1) {
                                        while (wsize > MAX_WRITE) {
                                                wsize -= MAX_WRITE;
@@ -4208,6 +4205,9 @@ retry_write:
                                        }
                                        wres = pwrite(fd, iov[0].iov_base, wsize, wpos);
                                } else {
+#ifdef MDB_USE_PWRITEV
+                                       wres = pwritev(fd, iov, n, wpos);
+#else
 retry_seek:
                                        if (lseek(fd, wpos, SEEK_SET) == -1) {
                                                rc = ErrCode();