File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1010#include < botan/internal/target_info.h>
1111#include < memory>
1212
13+ #if defined(BOTAN_TARGET_OS_IS_MACOS)
14+ #include < AvailabilityMacros.h>
15+ #endif
16+
1317#if defined(BOTAN_TARGET_OS_HAS_CAP_ENTER)
1418 #include < sys/capsicum.h>
1519 #include < unistd.h>
1620#elif defined(BOTAN_TARGET_OS_HAS_SETPPRIV)
1721 #include < priv.h>
18- #elif defined(BOTAN_TARGET_OS_HAS_SANDBOX_PROC)
22+ // macOS 10.6 has sandbox, but does not have sandbox_init
23+ #elif defined(BOTAN_TARGET_OS_HAS_SANDBOX_PROC) && \
24+ !(defined (BOTAN_TARGET_OS_IS_MACOS) && MAC_OS_X_VERSION_MIN_REQUIRED < 1070 )
1925 #include < sandbox.h>
2026#endif
2127
@@ -35,7 +41,8 @@ Sandbox::Sandbox() {
3541 m_name = " capsicum" ;
3642#elif defined(BOTAN_TARGET_OS_HAS_SETPPRIV)
3743 m_name = " privilege" ;
38- #elif defined(BOTAN_TARGET_OS_HAS_SANDBOX_PROC)
44+ #elif defined(BOTAN_TARGET_OS_HAS_SANDBOX_PROC) && \
45+ !(defined (BOTAN_TARGET_OS_IS_MACOS) && MAC_OS_X_VERSION_MIN_REQUIRED < 1070 )
3946 m_name = " sandbox" ;
4047#else
4148 m_name = " <none>" ;
@@ -93,7 +100,8 @@ bool Sandbox::init() {
93100 }
94101
95102 return true ;
96- #elif defined(BOTAN_TARGET_OS_HAS_SANDBOX_PROC)
103+ #elif defined(BOTAN_TARGET_OS_HAS_SANDBOX_PROC) && \
104+ !(defined (BOTAN_TARGET_OS_IS_MACOS) && MAC_OS_X_VERSION_MIN_REQUIRED < 1070 )
97105
98106 BOTAN_DIAGNOSTIC_PUSH
99107 BOTAN_DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
You can’t perform that action at this time.
0 commit comments