diff --git a/libraries/liblmdb/lmdb.h b/libraries/liblmdb/lmdb.h
index 92dd753d36..c21115d808 100644
--- a/libraries/liblmdb/lmdb.h
+++ b/libraries/liblmdb/lmdb.h
@@ -339,7 +339,8 @@ typedef void (MDB_rel_func)(MDB_val *item, void *oldptr, void *newptr, void *rel
#define MDB_REVERSEKEY 0x02
/** use sorted duplicates */
#define MDB_DUPSORT 0x04
- /** numeric keys in native byte order: either unsigned int or size_t.
+ /** numeric keys in native byte order, either unsigned int or #mdb_size_t.
+ * (lmdb expects 32-bit int <= size_t <= 32/64-bit mdb_size_t.)
* The keys must all be of the same size. */
#define MDB_INTEGERKEY 0x08
/** with #MDB_DUPSORT, sorted dup items have fixed size */
@@ -1126,7 +1127,8 @@ int mdb_txn_renew(MDB_txn *txn);
* keys must be unique and may have only a single data item.
*
#MDB_INTEGERKEY
* Keys are binary integers in native byte order, either unsigned int
- * or size_t, and will be sorted as such.
+ * or #mdb_size_t, and will be sorted as such.
+ * (lmdb expects 32-bit int <= size_t <= 32/64-bit mdb_size_t.)
* The keys must all be of the same size.
* #MDB_DUPFIXED
* This flag may only be used in combination with #MDB_DUPSORT. This option
diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c
index ba5a39dd8b..6e1a3702c9 100644
--- a/libraries/liblmdb/mdb.c
+++ b/libraries/liblmdb/mdb.c
@@ -1514,7 +1514,7 @@ static int mdb_reader_check0(MDB_env *env, int rlocked, int *dead);
static MDB_cmp_func mdb_cmp_memn, mdb_cmp_memnr, mdb_cmp_int, mdb_cmp_cint, mdb_cmp_long;
/** @endcond */
-/** Compare two items pointing at size_t's of unknown alignment. */
+/** Compare two items pointing at '#mdb_size_t's of unknown alignment. */
#ifdef MISALIGNED_OK
# define mdb_cmp_clong mdb_cmp_long
#else