Skip to content

Commit 7843b9c

Browse files
MacOS compatibility.
1 parent 7439a59 commit 7843b9c

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

include/pybind11/detail/non_limited_api.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
#include "common.h"
66

77
#include <filesystem>
8-
#if !defined(__APPLE__) && !defined(_WIN32)
9-
#include <dlfcn.h> // For `dlopen` and friends.
10-
#endif
118
#ifdef _WIN32
129
#define WIN32_LEAN_AND_MEAN
1310
#define NOMINMAX 1

source/non_limited_api/non_limited_api_stubs.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define PYBIND11_NONLIMITEDAPI_DLOPEN(dir, file) LoadLibraryW((dir + std::wstring(file.begin(), file.end()) + L".dll").c_str())
77
#define PYBIND11_NONLIMITEDAPI_DLOPEN_ERROR std::to_string(GetLastError()).c_str()
88
#else
9+
#include <dlfcn.h> // For `dlopen` and friends.
910
#define PYBIND11_NONLIMITEDAPI_DLOPEN(dir, file) dlopen((dir + "lib" + file + ".so").c_str(), RTLD_NOW | RTLD_GLOBAL)
1011
#define PYBIND11_NONLIMITEDAPI_DLOPEN_ERROR dlerror()
1112
#endif

0 commit comments

Comments
 (0)