From: Howard Chu Date: Sat, 3 Mar 2012 01:26:49 +0000 (-0800) Subject: ITS#7196 use IOV_MAX if it's defined and small X-Git-Tag: OPENLDAP_REL_ENG_2_4_32~125^2~42 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1b07b48c1abef0e5fdec19b0734fbf4bb1035f46;p=openldap ITS#7196 use IOV_MAX if it's defined and small --- 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);