From: "kosaki (Motohiro KOSAKI)" Date: 2012-07-19T03:44:17+09:00 Subject: [ruby-core:46550] [ruby-trunk - Bug #6748] bignum.c does not compile Issue #6748 has been updated by kosaki (Motohiro KOSAKI). I think it is not AIX specific issue. ffs() is defined in strings.h on almost all platform. but gcc and clang have built-in ffs. then we can't see this issue on Linux nor *BSD. ---------------------------------------- Bug #6748: bignum.c does not compile https://bugs.ruby-lang.org/issues/6748#change-28202 Author: pedz (Perry Smith) Status: Assigned Priority: Normal Assignee: kanemoto (Yutaka Kanemoto) Category: Target version: 1.9.3 ruby -v: ruby_1_9_3 branch I'm using the ruby_1_9_3 branch of ruby/ruby on github and bignum.c does not compile with an error that ffs is not defined. I'm on AIX 6.1 TL07 SP03. I assume HAVE_STRING_H is set (because AIX has string.h and strings.h) so ruby/ruby.h includes string.h but ffs is defined in strings.h. I noticed that time.c also uses ffs and it simply includes strings.h from within a #if construct. Adding: diff --git a/bignum.c b/bignum.c index 8d024fe..0439062 100644 --- a/bignum.c +++ b/bignum.c @@ -13,6 +13,9 @@ #include "ruby/util.h" #include "internal.h" +#ifdef HAVE_STRINGS_H +#include +#endif #include #include #include resolves the issue. -- http://bugs.ruby-lang.org/