--- IO-AIO/AIO.xs 2013/09/07 23:18:23 1.227 +++ IO-AIO/AIO.xs 2014/06/03 01:30:33 1.230 @@ -21,7 +21,11 @@ # include #endif -#if __linux__ +/* the incompetent fool that created musl keeps __linux__, refuses + * to implement any linux standard apis, and also has no way to test + * for his broken iplementation. on't complain if this fails for you. + */ +#if __linux__ && (defined __GLIBC__ || defined __UCLIBC__) # include # ifdef FS_IOC_FIEMAP # include @@ -1262,9 +1266,8 @@ else { /* read: check type and grow scalar as necessary */ - SvUPGRADE (data, SVt_PV); - if (SvLEN (data) >= SvCUR (data)) - svptr = SvGROW (data, len + dataoffset + 1); + if (!SvPOK (data) || SvLEN (data) >= SvCUR (data)) + svptr = sv_grow (data, len + dataoffset + 1); else if (SvCUR (data) < len + dataoffset) croak ("length + dataoffset outside of scalar, and cannot grow"); } @@ -1618,7 +1621,10 @@ req->type = EIO_GROUP; + PUTBACK; req_submit (req); + SPAGAIN; + XPUSHs (req_sv (req, aio_grp_stash)); }