diff options
author | Michael Gmelin <grembo@FreeBSD.org> | 2019-02-12 11:19:54 +0000 |
---|---|---|
committer | Michael Gmelin <grembo@FreeBSD.org> | 2019-02-12 11:19:54 +0000 |
commit | 3e035751fad0d3fae9a0db0252539a4fc7e8379b (patch) | |
tree | 5f0d7988b5d40494c141aba2a902a067d5dcc500 /devel/ice37/files/patch-cpp-test-include-TestHelper.h | |
parent | Update to 2.32 (diff) |
Update devel/{ice37|php-ice37|py-ice37} to v3.7.2
Notes
Notes:
svn path=/head/; revision=492774
Diffstat (limited to 'devel/ice37/files/patch-cpp-test-include-TestHelper.h')
-rw-r--r-- | devel/ice37/files/patch-cpp-test-include-TestHelper.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/devel/ice37/files/patch-cpp-test-include-TestHelper.h b/devel/ice37/files/patch-cpp-test-include-TestHelper.h new file mode 100644 index 000000000000..3ccbef2f6a7a --- /dev/null +++ b/devel/ice37/files/patch-cpp-test-include-TestHelper.h @@ -0,0 +1,23 @@ +--- cpp/test/include/TestHelper.h.orig 2019-02-11 14:02:41.681160000 +0100 ++++ cpp/test/include/TestHelper.h 2019-02-11 16:04:38.557681000 +0100 +@@ -199,4 +199,20 @@ + + #define test(ex) ((ex) ? ((void)0) : ::Test::testFailed(#ex, __FILE__, __LINE__)) + ++#if defined(__FreeBSD__) ++extern "C" { int sysctlbyname(const char *name, void *oldp, size_t *oldlenp, ++ const void *newp, size_t newlen); } ++inline bool inFreeBSDJail() ++{ ++ int jailed; ++ size_t size = sizeof(jailed); ++ return (sysctlbyname("security.jail.jailed", &jailed, &size, NULL, 0) != -1 || jailed); ++} ++#else ++inline bool inFreeBSDJail() ++{ ++ return false; ++} ++#endif ++ + #endif |