From 80da8c588f5a44c200e657c1aeaa1e89856b2042 Mon Sep 17 00:00:00 2001 From: nia Date: Tue, 9 Nov 2021 11:05:07 +0000 Subject: mk: Create per-platform PKG_HAVE_EVENTFD and PKG_HAVE_TIMERFD variables. --- mk/platform/Linux.mk | 5 ++++- mk/platform/NetBSD.mk | 12 +++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'mk/platform') diff --git a/mk/platform/Linux.mk b/mk/platform/Linux.mk index b7a42b2e3a4..ce9231045b7 100644 --- a/mk/platform/Linux.mk +++ b/mk/platform/Linux.mk @@ -1,4 +1,4 @@ -# $NetBSD: Linux.mk,v 1.84 2020/12/13 16:26:12 nia Exp $ +# $NetBSD: Linux.mk,v 1.85 2021/11/09 11:05:07 nia Exp $ # # Variable definitions for the Linux operating system. @@ -184,3 +184,6 @@ GLIBC_VERSION= ${_GLIBC_VERSION_CMD:sh} .if defined(NOGCCERROR) MAKE_ENV+= NOGCCERROR=true .endif + +PKG_HAVE_EVENTFD= # defined +PKG_HAVE_TIMERFD= # defined diff --git a/mk/platform/NetBSD.mk b/mk/platform/NetBSD.mk index 2d05fe5a5a5..a1f8488f4ca 100644 --- a/mk/platform/NetBSD.mk +++ b/mk/platform/NetBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.mk,v 1.67 2021/10/12 07:48:53 nia Exp $ +# $NetBSD: NetBSD.mk,v 1.68 2021/11/09 11:05:07 nia Exp $ # # Variable definitions for the NetBSD operating system. @@ -126,6 +126,16 @@ FFLAGS+= -mieee PKG_HAVE_KQUEUE= # defined .endif +# check for eventfd(2) support, added in NetBSD-9.99.x +.if exists(/usr/include/sys/eventfd.h) +PKG_HAVE_EVENTFD= # defined +.endif + +# check for timerfd(2) support, added in NetBSD-9.99.x +.if exists(/usr/include/sys/timerfd.h) +PKG_HAVE_TIMERFD= # defined +.endif + # Register support for FORTIFY (with GCC) .if !empty(OS_VERSION:M[2-6].*) # Disable on older versions, see: -- cgit v1.2.3