Skip to content

Commit

Permalink
* gc.c: i686-linux needs to define _XOPEN_SOURCE 600 for posix_memalign.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nurse committed Jan 8, 2012
1 parent 88b16ce commit 471394f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Mon Jan 9 07:46:17 2012 NARUSE, Yui <naruse@ruby-lang.org>

* gc.c: i686-linux needs to define _XOPEN_SOURCE 600 for posix_memalign.

Mon Jan 9 04:24:59 2012 NARUSE, Yui <naruse@ruby-lang.org>

* gc.c (rb_objspace_free): global_List is allocated with xmalloc.
Expand Down
8 changes: 5 additions & 3 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@

#if defined _WIN32 || defined __CYGWIN__
#include <windows.h>
#endif

#if !defined(__MINGW32__) && !defined(_WIN32) && !defined(__CYGWIN__) &&!defined(HAVE_POSIX_MEMALIGN) &&defined(HAVE_MEMALIGN)
#elif defined(HAVE_POSIX_MEMALIGN)
# ifdef __linux__ /* i386 linux needs #define _XOPEN_SOURCE 600 to use posix_memalign */
# define _XOPEN_SOURCE 600
# endif
#elif defined(HAVE_MEMALIGN)
#include <malloc.h>
#endif

Expand Down

0 comments on commit 471394f

Please sign in to comment.