aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-12 03:59:13 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-12 03:59:13 +0000
commit605bc305bb2e33c3fa56808671429f73c8a60d75 (patch)
tree150cc6304553e01078497111049473a680813863 /include
parent60cfd99eb5924266268991dcd1f267e1e190ed97 (diff)
downloadruby-605bc305bb2e33c3fa56808671429f73c8a60d75.tar.gz
Fix compile error on debian8 and gentoo
https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian8/ruby-trunk/log/20180711T213004Z.log.html.gz#miniruby https://rubyci.org/logs/rubyci.s3.amazonaws.com/gentoo/ruby-trunk/log/20180711T213003Z.log.html.gz#miniruby ``` ./include/ruby/ruby.h:2213:49: error: missing binary operator before token "(" # if defined(__has_attribute) && __has_attribute(diagnose_if) ^ ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 090af225e1..81f3c691df 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -2210,7 +2210,10 @@ ERRORFUNC(("variable argument length doesn't match"), int rb_scan_args_length_mi
# define rb_scan_args_isdigit(c) ((unsigned char)((c)-'0')<10)
-# if defined(__has_attribute) && __has_attribute(diagnose_if)
+#if !defined(__has_attribute)
+#define __has_attribute(x) 0
+#endif
+# if __has_attribute(diagnose_if)
# define rb_scan_args_count_end(fmt, ofs, varc, vari) \
(fmt[ofs] ? rb_scan_args_bad_format(fmt) : (vari))
# else