Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
A patch for building ruby 1.9.3 in SmartOS / OpenIndiana
diff --git a/siphash.c b/siphash.c
index c100b14..589cdec 100644
--- a/siphash.c
+++ b/siphash.c
@@ -8,7 +8,11 @@
#ifdef _WIN32
#define BYTE_ORDER __LITTLE_ENDIAN
#elif !defined BYTE_ORDER
- #include <endian.h>
+ #if defined(sun)
+ #include <sys/isa_defs.h>
+ #else
+ #include <endian.h>
+ #endif
#endif
#ifndef LITTLE_ENDIAN
#define LITTLE_ENDIAN __LITTLE_ENDIAN
Owner

mattconnolly commented Nov 18, 2012

Save this patch file, eg to 'smartos.patch', then build ruby 1.9.3 in rvm like so:

$ rvm install 1.9.3 --patch smartos.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment