From nobody Fri Apr 01 13:32:27 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D458A1A4BA11; Fri, 1 Apr 2022 13:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KVLgv5cflz4m91; Fri, 1 Apr 2022 13:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648819947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/V9uQOoabfqTU6e5T/hc3htUUEu3zXQk8QnXKxizqC4=; b=qHVxpST+tbmWtwmTTOkoOGlYyXUCTuuDbOiB5AlKAJwg2OQzP3Q5N6HtFLqJ+7aHNPM7Ra Dv8IIUGJL4prx/y2zuAyx98V8EcW6N+xcSxB5PqHhbKTWsA/hVwzeZSCLTUnBuyVXLnc61 73ZRj2g48TuKP1OmGm2AgINap0TLF5qB/s5UIzMr+TYXYDSepBZBVhoVl/w3deCrdcHIpL aSoOAJbInxkw+h01lE9ZVfyN/5cPff1vyUihKtoCUxsBTDP3OBwTTwra99w+YZDpxAteS7 +dpnLNHgOjfWKJ7N2B3fmPQ4ZF5tloxf/ulyXKl7rR+zEsn1t1sTwusIexRFrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0A91150C2; Fri, 1 Apr 2022 13:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 231DWRQh041569; Fri, 1 Apr 2022 13:32:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 231DWRWp041568; Fri, 1 Apr 2022 13:32:27 GMT (envelope-from git) Date: Fri, 1 Apr 2022 13:32:27 GMT Message-Id: <202204011332.231DWRWp041568@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Roman Bogorodskiy Subject: git: 19c1081a114f - main - security/libgpg-error: improve threading detection List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: novel X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19c1081a114f1612e7b71524d2e945ef64a020ac Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648819947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/V9uQOoabfqTU6e5T/hc3htUUEu3zXQk8QnXKxizqC4=; b=rmL7Aa18fiOa59XXiTIiU1azj2U6cLy/1w3M6OG9Tl0mxRPv88pgFsY73iUINR0lOmRgIi /1UiT9FgkpEH/XFAqDvrp+2JZwiA+CHb4+WNqbAMQRnzitleBi6Rcpuwdv667U318YxaEi WQEqhm5rQEL2t87kqBxWfOwG9vlr7Gl9fjpU1ZSwis4Au2E6Kx6+aQYrbxVZ7w9Yyfgi85 PlCwBHwjskP8L2iKZ5i/b4SNGZ27zQJe67vsvKwlcU5+dXGTDBw0J8UH0jmmT6z7O6rGD5 RLF3BHlsKt8jG1UQeqmGyBCh7s80M7gJxBuu8RVyNOSCzYYA4tjXPoyCEt4Z5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648819947; a=rsa-sha256; cv=none; b=pF24xAcQgMSEKlQ+zUYY1ojh/SE91Gouvzd4Qtdi2LiNcjaPuVJxBGJdqJoRJjIDCkfrvk rQjDsyjnGH5C9uOzmyjV1/3kglpIBNlkF9BH01i96u2/uTvulTXfUkaEa5kwBfMUn8tN2k y1ulVrKc8npR9qyyFu40bztA3kRsPVE7k3sQpg8XLDzAkv+th+Nenx06JlqITtBYELy+Hl ZeRRFRxUWX2nQj3OgOy+flM+Kc5soJ3otxr8wruEHVcBJoOLazqTZRt049rD1IVf1/mM5v uhcEWncUYS+HW5vfNqYKrxH19MVyFIYQvk6eYZ2wycDCMOxPY493aFo0jQachA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by novel: URL: https://cgit.FreeBSD.org/ports/commit/?id=19c1081a114f1612e7b71524d2e945ef64a020ac commit 19c1081a114f1612e7b71524d2e945ef64a020ac Author: Roman Bogorodskiy AuthorDate: 2022-04-01 13:22:22 +0000 Commit: Roman Bogorodskiy CommitDate: 2022-04-01 13:31:14 +0000 security/libgpg-error: improve threading detection Pull the upstream patch to improve threading detection. This is expected to only fix issues on the older non-supported FreeBSD releases, so do not bump PORTREVISION. Obtained from: upstream --- security/libgpg-error/files/patch-posix-lock-fix | 85 ++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/security/libgpg-error/files/patch-posix-lock-fix b/security/libgpg-error/files/patch-posix-lock-fix new file mode 100644 index 000000000000..af29591e9205 --- /dev/null +++ b/security/libgpg-error/files/patch-posix-lock-fix @@ -0,0 +1,85 @@ +From 6e17e70bb7eea1f6ed4c08f795ea65a09f89d38f Mon Sep 17 00:00:00 2001 +From: NIIBE Yutaka +Date: Mon, 28 Mar 2022 13:36:19 +0900 +Subject: [PATCH] core: Fix support of posix-lock for FreeBSD. + +* src/posix-lock.c [__FreeBSD__] (use_pthread_p): Use +pthread_key_create to determine if it's linked to lpthread or not. + +-- + +This is from glthread_in_use in gnulib/lib/glthread/threadlib.c. + +On FreeBSD, pthread_key_create in there in libc (stub function) as +well as -lpthread (real one), while pthread_create is not available +in libc. + +Signed-off-by: NIIBE Yutaka +--- + src/posix-lock.c | 36 +++++++++++++++++++++++++++++++++++- + 1 file changed, 35 insertions(+), 1 deletion(-) + +diff --git a/src/posix-lock.c b/src/posix-lock.c +index d0fd07a..85ec660 100644 +--- src/posix-lock.c ++++ src/posix-lock.c +@@ -67,6 +67,38 @@ + # endif + # endif /*!USE_POSIX_THREADS_WEAK*/ + # if PTHREAD_IN_USE_DETECTION_HARD ++# if defined __FreeBSD__ || defined __DragonFly__ /* FreeBSD */ ++ ++/* Test using pthread_key_create. */ ++ ++static int ++use_pthread_p (void) ++{ ++ static int tested; ++ static int result; /* 1: linked with -lpthread, 0: only with libc */ ++ ++ if (!tested) ++ { ++ pthread_key_t key; ++ int err = pthread_key_create (&key, NULL); ++ ++ if (err == ENOSYS) ++ result = 0; ++ else ++ { ++ result = 1; ++ if (err == 0) ++ pthread_key_delete (key); ++ } ++ tested = 1; ++ } ++ return result; ++} ++ ++# else /* Solaris, HP-UX */ ++ ++/* Test using pthread_create. */ ++ + /* The function to be executed by a dummy thread. */ + static void * + dummy_thread_func (void *arg) +@@ -84,7 +116,7 @@ use_pthread_p (void) + { + pthread_t thread; + +- if (pthread_create (&thread, NULL, dummy_thread_func, NULL)) ++ if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0) + result = 0; /* Thread creation failed. */ + else + { +@@ -102,6 +134,8 @@ use_pthread_p (void) + } + return result; + } ++# endif /* Solaris, HP-UX */ ++ + # endif /*PTHREAD_IN_USE_DETECTION_HARD*/ + #endif /*USE_POSIX_THREADS*/ + +-- +2.11.0 +