Skip to content

Instantly share code, notes, and snippets.

@misterdjules
Created December 17, 2014 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save misterdjules/531266720678b2127881 to your computer and use it in GitHub Desktop.
Save misterdjules/531266720678b2127881 to your computer and use it in GitHub Desktop.
Patch to make ICU source build on SmartOS
diff -urN icu/source/common/uposixdefs.h icu-fixed/source/common/uposixdefs.h
--- icu/source/common/uposixdefs.h 2014-10-03 09:11:18.000000000 +0000
+++ icu-fixed/source/common/uposixdefs.h 2014-12-16 15:54:15.091574242 +0000
@@ -52,7 +52,7 @@
*
* z/OS needs this definition for timeval and to get usleep.
*/
-#if !defined(_XOPEN_SOURCE_EXTENDED)
+#if !defined(_XOPEN_SOURCE_EXTENDED) && !defined(__sun)
# define _XOPEN_SOURCE_EXTENDED 1
#endif
diff -urN icu/source/configure.ac icu-fixed/source/configure.ac
--- icu/source/configure.ac 2014-10-03 09:18:36.000000000 +0000
+++ icu-fixed/source/configure.ac 2014-12-16 16:14:48.680055048 +0000
@@ -475,7 +475,7 @@
if [[ "$GXX" = yes ]]; then
# if CXXFLAGS does not have a "-std=" setting, set it now to -std=c++0x,
# and check that the compiler still works.
- if ! echo "$CXXFLAGS" | grep '\-std=' >/dev/null 2>&1; then
+ if [ ! echo "$CXXFLAGS" | grep '\-std=' >/dev/null 2>&1 ] && [ "x{platform}" != "xU_SOLARIS" ]; then
OLD_CXXFLAGS="${CXXFLAGS}"
CXXFLAGS="$CXXFLAGS --std=c++0x"
AC_MSG_CHECKING([[if we have a C++11 compiler]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment