summaryrefslogtreecommitdiff
path: root/devel/ice/files/patch-cpp-test-include-TestCommon.h
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2012-03-24 15:57:39 +0000
committerMartin Wilke <miwi@FreeBSD.org>2012-03-24 15:57:39 +0000
commitccecfeab22539d9ad1268f4eaf3383ce380b7ae0 (patch)
tree3770ac1ea6c0cac0b96bda09ec58fe0bd6565b4b /devel/ice/files/patch-cpp-test-include-TestCommon.h
parentFix formatting so that "make tidy" passes (diff)
- Fix build with gcc 4.7
- Add support for clang PR: 165702 Submitted by: Michael Gmelin <freebsd@grem.de> (maintainer) Feature safe: yes
Notes
Notes: svn path=/head/; revision=293741
Diffstat (limited to 'devel/ice/files/patch-cpp-test-include-TestCommon.h')
-rw-r--r--devel/ice/files/patch-cpp-test-include-TestCommon.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/devel/ice/files/patch-cpp-test-include-TestCommon.h b/devel/ice/files/patch-cpp-test-include-TestCommon.h
new file mode 100644
index 000000000000..c703fca87fbd
--- /dev/null
+++ b/devel/ice/files/patch-cpp-test-include-TestCommon.h
@@ -0,0 +1,25 @@
+--- cpp.orig/test/include/TestCommon.h 2011-06-15 21:43:59.000000000 +0200
++++ cpp/test/include/TestCommon.h 2012-03-04 20:14:53.000000000 +0100
+@@ -17,6 +17,22 @@
+ #include <stdlib.h>
+ #endif
+
++#if defined(__FreeBSD__)
++# include <sys/types.h>
++# include <sys/sysctl.h>
++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
++
+ void
+ inline testFailed(const char* expr, const char* file, unsigned int line)
+ {