From ed4689397fa6ba5c3ca522f89a04ccdfedffb595 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Thu, 8 Apr 2021 09:08:51 +0200 Subject: [PATCH] ncurses: build with __USE_MINGW_ACCESS to fix the ucrt build ncurses calls access() with X_OK in various places which isn't supported on Windows. mingw-w64 ships with a wrapper which does if __USE_MINGW_ACCESS is defined, so use that for now. --- mingw-w64-ncurses/PKGBUILD | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-w64-ncurses/PKGBUILD b/mingw-w64-ncurses/PKGBUILD index 4a42a883dd..05db291b48 100644 --- a/mingw-w64-ncurses/PKGBUILD +++ b/mingw-w64-ncurses/PKGBUILD @@ -7,7 +7,7 @@ pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" #_date_rev=20190630 #pkgver=${_base_ver}.${_date_rev} pkgver=6.2 -pkgrel=2 +pkgrel=3 pkgdesc="System V Release 4.0 curses emulation library (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64') @@ -36,6 +36,9 @@ build() { [[ -d build-${MINGW_CHOST} ]] && rm -rf build-${MINGW_CHOST} mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} + # It passes X_OK to access() on Windows which isn't supported with ucrt + CFLAGS+=" -D__USE_MINGW_ACCESS" + ../${_realname}-${pkgver}/configure \ --prefix=${MINGW_PREFIX} \ --mandir=${MINGW_PREFIX}/share/man \