From 1b07b48c1abef0e5fdec19b0734fbf4bb1035f46 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 2 Mar 2012 17:26:49 -0800 Subject: [PATCH] ITS#7196 use IOV_MAX if it's defined and small --- libraries/libmdb/mdb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 925aae6a9f..f028ecb286 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -947,6 +947,10 @@ struct MDB_env { }; /** max number of pages to commit in one writev() call */ #define MDB_COMMIT_PAGES 64 +#if defined(IOV_MAX) && IOV_MAX < MDB_COMMIT_PAGES +#undef MDB_COMMIT_PAGES +#define MDB_COMMIT_PAGES IOV_MAX +#endif static MDB_page *mdb_page_alloc(MDB_cursor *mc, int num); static MDB_page *mdb_page_new(MDB_cursor *mc, uint32_t flags, int num); -- 2.39.5