1 /* 2 * Copyright (C) Internet Systems Consortium, Inc. ("ISC") 3 * 4 * SPDX-License-Identifier: MPL-2.0 5 * 6 * This Source Code Form is subject to the terms of the Mozilla Public 7 * License, v. 2.0. If a copy of the MPL was not distributed with this 8 * file, you can obtain one at https://mozilla.org/MPL/2.0/. 9 * 10 * See the COPYRIGHT file distributed with this work for additional 11 * information regarding copyright ownership. 12 */ 13 14 #pragma once 15 16 #define DNS_LMDB_COMMON_FLAGS (MDB_CREATE | MDB_NOSUBDIR | MDB_NOLOCK) 17 #ifndef __OpenBSD__ 18 #define DNS_LMDB_FLAGS (DNS_LMDB_COMMON_FLAGS) 19 #else /* __OpenBSD__ */ 20 /* 21 * OpenBSD does not have a unified buffer cache, which requires both reads and 22 * writes to be performed using mmap(). 23 */ 24 #define DNS_LMDB_FLAGS (DNS_LMDB_COMMON_FLAGS | MDB_WRITEMAP) 25 #endif /* __OpenBSD__ */ 26