--- IO-AIO/AIO.xs 2018/02/20 06:05:19 1.255 +++ IO-AIO/AIO.xs 2018/02/20 06:54:46 1.256 @@ -2232,16 +2232,13 @@ PPCODE: { int fd = s_fileno_croak (fh, 0); +#if HAVE_TIMERFD int res; struct itimerspec its, ots; ts_set (&its.it_interval, interval); ts_set (&its.it_value , value); -#if HAVE_TIMERFD res = timerfd_settime (fd, flags, &its, &ots); -#else - res = (errno = ENOSYS, -1); -#endif if (!res) { @@ -2249,6 +2246,9 @@ PUSHs (newSVnv (ts_get (&ots.it_interval))); PUSHs (newSVnv (ts_get (&ots.it_value))); } +#else + errno = ENOSYS; +#endif } void @@ -2256,13 +2256,10 @@ PPCODE: { int fd = s_fileno_croak (fh, 0); +#if HAVE_TIMERFD int res; struct itimerspec ots; -#if HAVE_TIMERFD res = timerfd_gettime (fd, &ots); -#else - res = (errno = ENOSYS, -1); -#endif if (!res) { @@ -2270,6 +2267,9 @@ PUSHs (newSVnv (ts_get (&ots.it_interval))); PUSHs (newSVnv (ts_get (&ots.it_value))); } +#else + errno = ENOSYS; +#endif } UV