Tweak ppoll() to include 1003.1-2024 visibility

Note in the manpage that the 2024 edition finally added ppoll(), and
also add the appropriate declarations for the correct versions of
_POSIX_C_SOURCE.

Differential Revision:	https://reviews.freebsd.org/D48043
This commit is contained in:
Kyle Evans
2024-12-13 22:15:19 -06:00
parent 35e63136a8
commit 212d7f439a
3 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ __ssp_redirect_raw_impl(int, poll, poll,
return (__ssp_real(poll)(fds, nfds, timeout));
}
#if __BSD_VISIBLE
#if _POSIX_C_SOURCE >= 202405
__ssp_redirect_raw_impl(int, ppoll, ppoll,
(struct pollfd fds[], nfds_t nfds,
const struct timespec *__restrict timeout,
@@ -53,7 +53,7 @@ __ssp_redirect_raw_impl(int, ppoll, ppoll,
return (__ssp_real(ppoll)(fds, nfds, timeout, newsigmask));
}
#endif /* __BSD_VISIBLE */
#endif /* _POSIX_C_SOURCE >= 202405 */
__END_DECLS
#endif /* __SSP_FORTIFY_LEVEL > 0 */
+3 -2
View File
@@ -27,7 +27,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd April 27, 2021
.Dd December 11, 2024
.Dt POLL 2
.Os
.Sh NAME
@@ -268,7 +268,8 @@ function conforms to
.St -p1003.1-2001 .
The
.Fn ppoll
is not specified by POSIX.
function conforms to
.St -p1003.1-2024 .
The
POLLRDHUP
flag is not specified by POSIX, but is compatible with Linux and illumos.
+2 -2
View File
@@ -96,7 +96,7 @@ struct pollfd {
#ifndef _KERNEL
#if __BSD_VISIBLE
#if _POSIX_C_SOURCE >= 202405
#include <sys/_types.h>
#include <sys/_sigset.h>
@@ -115,7 +115,7 @@ typedef __sigset_t sigset_t;
__BEGIN_DECLS
int poll(struct pollfd _pfd[], nfds_t _nfds, int _timeout);
#if __BSD_VISIBLE
#if _POSIX_C_SOURCE >= 202405
int ppoll(struct pollfd _pfd[], nfds_t _nfds,
const struct timespec *__restrict _timeout,
const sigset_t *__restrict _newsigmask);