--- IO-AIO/AIO.xs 2020/12/29 15:25:26 1.286 +++ IO-AIO/AIO.xs 2022/04/09 19:34:05 1.294 @@ -86,6 +86,7 @@ #include #include + #include #include #include #include @@ -228,6 +229,11 @@ # define PAGESIZE sysconf (_SC_PAGESIZE) #endif +/* solaris perl seems to declare a wrong syscall function that clashes with system includes */ +#ifdef __sun +# undef HAVE_SYSCALL +#endif + #if HAVE_SYSCALL #include #else @@ -1199,6 +1205,10 @@ const_iv (MAP_32BIT) const_iv (MAP_HUGETLB) const_iv (MAP_STACK) + const_iv (MAP_FIXED_NOREPLACE) + const_iv (MAP_SHARED_VALIDATE) + const_iv (MAP_SYNC) + const_iv (MAP_UNINITIALIZED) const_iv (MREMAP_MAYMOVE) const_iv (MREMAP_FIXED) @@ -1303,6 +1313,8 @@ const_iv (MFD_CLOEXEC) const_iv (MFD_ALLOW_SEALING) const_iv (MFD_HUGETLB) + const_iv (MFD_HUGETLB_2MB) + const_iv (MFD_HUGETLB_1GB) const_iv (CLOCK_REALTIME) const_iv (CLOCK_MONOTONIC) @@ -1366,6 +1378,31 @@ const_iv (MOVE_MOUNT_T_AUTOMOUNTS) const_iv (MOVE_MOUNT_T_EMPTY_PATH) + /* waitid */ + const_iv (P_PID) + const_iv (P_PIDFD) + const_iv (P_PGID) + const_iv (P_ALL) + + const_iv (FSCONFIG_SET_FLAG) + const_iv (FSCONFIG_SET_STRING) + const_iv (FSCONFIG_SET_BINARY) + const_iv (FSCONFIG_SET_PATH) + const_iv (FSCONFIG_SET_PATH_EMPTY) + const_iv (FSCONFIG_SET_FD) + const_iv (FSCONFIG_CMD_CREATE) + const_iv (FSCONFIG_CMD_RECONFIGURE) + + const_iv (MOUNT_ATTR_RDONLY) + const_iv (MOUNT_ATTR_NOSUID) + const_iv (MOUNT_ATTR_NODEV) + const_iv (MOUNT_ATTR_NOEXEC) + const_iv (MOUNT_ATTR__ATIME) + const_iv (MOUNT_ATTR_RELATIME) + const_iv (MOUNT_ATTR_NOATIME) + const_iv (MOUNT_ATTR_STRICTATIME) + const_iv (MOUNT_ATTR_NODIRATIME) + /* these are libeio constants, and are independent of gendef0 */ const_eio (SEEK_SET) const_eio (SEEK_CUR) @@ -2649,6 +2686,7 @@ PPCODE: { int res; +#if HAVE_SIGINFO_T siginfo_t si = { 0 }; if (SvOK (siginfo)) @@ -2657,7 +2695,7 @@ SV **svp; if (!SvROK (siginfo) || SvTYPE (SvRV (siginfo)) != SVt_PVHV) - croak ("siginfo argument must be a hashref code, pid, uid and value_int or value_ptr members, caught"); + croak ("siginfo argument must be a hashref with 'code', 'pid', 'uid' and 'value_int' or 'value_ptr' members, caught"); hv = (HV *)SvRV (siginfo); @@ -2670,6 +2708,9 @@ /*GENDEF0_SYSCALL(pidfd_send_signal,424)*/ res = syscall (SYS_pidfd_send_signal, s_fileno_croak (pidfh, 0), sig, SvOK (siginfo) ? &si : 0, flags); +#else + res = (errno = ENOSYS, -1); +#endif XPUSHs (sv_2mortal (newSViv (res))); }