diff options
author | fhajny <fhajny@pkgsrc.org> | 2012-11-26 12:37:52 +0000 |
---|---|---|
committer | fhajny <fhajny@pkgsrc.org> | 2012-11-26 12:37:52 +0000 |
commit | 32a6462c136545e5b5b72c8f4c1ea88b74511cde (patch) | |
tree | d18f6e06f6634b0ed3c96d9e16b812fd5147cf96 /lang/ruby193-base/patches | |
parent | a976e79f4c8b67ef8553d1ec433076abd566c39f (diff) | |
download | pkgsrc-32a6462c136545e5b5b72c8f4c1ea88b74511cde.tar.gz |
Fix build on SunOS as per
http://bugs.ruby-lang.org/projects/ruby-193/repository/revisions/37653
Diffstat (limited to 'lang/ruby193-base/patches')
-rw-r--r-- | lang/ruby193-base/patches/patch-random.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lang/ruby193-base/patches/patch-random.c b/lang/ruby193-base/patches/patch-random.c new file mode 100644 index 00000000000..c5384a35160 --- /dev/null +++ b/lang/ruby193-base/patches/patch-random.c @@ -0,0 +1,27 @@ +$NetBSD: patch-random.c,v 1.1 2012/11/26 12:37:53 fhajny Exp $ + +Fix build on SunOS by making sure endianness is known. +http://bugs.ruby-lang.org/projects/ruby-193/repository/revisions/37653 + +--- random.c.orig 2012-11-09 15:38:38.000000000 +0000 ++++ random.c +@@ -1261,6 +1261,19 @@ random_s_rand(int argc, VALUE *argv, VAL + + #define SIP_HASH_STREAMING 0 + #define sip_hash24 ruby_sip_hash24 ++#if !defined _WIN32 && !defined BYTE_ORDER ++# ifdef WORDS_BIGENDIAN ++# define BYTE_ORDER BIG_ENDIAN ++# else ++# define BYTE_ORDER LITTLE_ENDIAN ++# endif ++# ifndef LITTLE_ENDIAN ++# define LITTLE_ENDIAN 1234 ++# endif ++# ifndef BIG_ENDIAN ++# define BIG_ENDIAN 4321 ++# endif ++#endif + #include "siphash.c" + + static st_index_t hashseed; |