apr: minor fix fcntl check for EACCES

fcntl lock isn't the default method on Haiku
This commit is contained in:
Jerome Duval
2022-04-26 14:44:39 +02:00
parent b17f574e8b
commit 7f518b9ffd
2 changed files with 41 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ following:
HOMEPAGE="http://apr.apache.org/"
COPYRIGHT="2012 The Apache Software Foundation"
LICENSE="Apache v2"
REVISION="2"
REVISION="3"
SOURCE_URI="http://archive.apache.org/dist/apr/apr-$portVersion.tar.gz"
CHECKSUM_SHA256="48e9dbf45ae3fdc7b491259ffb6ccf7d63049ffacbc1c0977cced095e4c2d5a2"
PATCHES="apr-$portVersion.patchset"

View File

@@ -1,4 +1,4 @@
From 2d2c651eab75b90d38fca36d84a7047d99feea59 Mon Sep 17 00:00:00 2001
From 949d8099d5e1578ef443033c080405ff12a891c7 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 15 Jul 2017 13:50:02 +0200
Subject: apply 1.5.2 patch.
@@ -60,7 +60,7 @@ index 6833b32..b6514a3 100644
2.30.2
From 0b45801519ddd64fbb25ef8d488e0337fc09c57d Mon Sep 17 00:00:00 2001
From 8021c3550e2b5cdb63865caac83292fe97266792 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@gentoo.org>
Date: Wed, 25 Nov 2020 09:36:25 +0000
Subject: build/apr_common.m4: avoid explicit inclusion of '"confdefs.h"'
@@ -124,7 +124,7 @@ index f4e2dfd..6f5782e 100644
2.30.2
From ded89174cb19bf46ba9cfc273482b4a3c6350dd0 Mon Sep 17 00:00:00 2001
From c7539ee1246f5599653228a19c3b6a53fe69db6d Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 25 Apr 2022 21:18:48 +0200
Subject: Haiku: decide to use standard POSIX methods
@@ -170,3 +170,40 @@ index b6514a3..eb1864c 100644
--
2.30.2
From bb9b40ae5b8715a1301ff04108be55b1f8bd503c Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 26 Apr 2022 14:42:58 +0200
Subject: fix checking if fcntl returns EACCES when F_SETLK is already held
passing errno with exit status might not work
diff --git a/configure.in b/configure.in
index eb1864c..0db1070 100644
--- a/configure.in
+++ b/configure.in
@@ -2445,6 +2445,7 @@ AC_TRY_RUN([
int fd;
struct flock proc_mutex_lock_it = {0};
const char *fname = "conftest.fcntl";
+int lockit();
int main()
{
@@ -2463,11 +2464,11 @@ int main()
wait(&status);
}
else {
- return(lockit());
+ return (lockit() != EACCES ? 1 : 0);
}
close(fd);
- exit(WEXITSTATUS(status) != EACCES);
+ exit(WEXITSTATUS(status));
}
int lockit() {
--
2.30.2