summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-11 13:33:14 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-11 13:33:14 +0000
commit57bc5eaf2f9b44ad8321fecf6dfa45d82a50c580 (patch)
tree4a5e3e0cf3656e829ad4c830586e13ec57f92cc3 /include
parent3fedb5128f33390959cfcd97a624b33b0f22f372 (diff)
Fixes build failures on Portable Native Client.
Note: Some of the fixes are for newlib in general but not NaCl-specific. * include/ruby/intern.h (rb_fd_select): declare struct timeval, or the struct gets local to the function in C99. * file.c (#include): add nacl/stat.h for PNaCl. (utimes): added a declaration for PNaCl. (stat_atimespec): stat::st_atimensec is long long but timespec::tv_nsec is long in PNaCl. (stat_mtimespec, stat_ctimespec): ditto. (rb_group_member): disable getgroups unless HAVE_GETGROUPS. (eaccess): unify the fallback to generic defined(USE_GETEUID). * io.c: include sys/time.h for struct timeval. (rb_close_before_exec): nothing we can do if F_GETFD is not available. (ioctl): pnacl newlib actually doesn't have ioctl. * process.c (maxgroups): it is used iff defined(_SC_NGROUPS_MAX) || defined(NGROUPS_MAX) but not defined(HAVE_GETGROUPS) || defined(HAVE_SETGROUPS). (obj2gid): fail unless the object is a Fixnum if getgrnam is not available. (disable_child_handler_fork_child): sigaction is not available in PNaCl newlib. * configure.in (warnflags, strict_warnflags): avoid -ansi for strlcpy. (rb_cv_gcc_atomic_builtins): also check __atomic_or_etch because it is used in ruby_atomic.h. (rb_cv_gcc_sync_builtins): ditto. (HAVE_GETGRNAM): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/intern.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 41f256722e..591589ae16 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -316,6 +316,8 @@ void rb_fd_clr(int, rb_fdset_t *);
int rb_fd_isset(int, const rb_fdset_t *);
void rb_fd_copy(rb_fdset_t *, const fd_set *, int);
void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
+
+struct timeval;
int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
#define rb_fd_ptr(f) ((f)->fdset)