NetBSD Problem Report #56165

From www@netbsd.org  Fri May 14 10:41:25 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 5C4F61A9243
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 14 May 2021 10:41:25 +0000 (UTC)
Message-Id: <20210514104123.D403C1A9287@mollari.NetBSD.org>
Date: Fri, 14 May 2021 10:41:23 +0000 (UTC)
From: pekdon@gmail.com
Reply-To: pekdon@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Add strnlen to _OPSYS_MISSING_FEATURES on Solaris < 5.11
X-Send-Pr-Version: www-1.0

>Number:         56165
>Category:       pkg
>Synopsis:       Add strnlen to _OPSYS_MISSING_FEATURES on Solaris < 5.11
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 14 10:45:00 +0000 2021
>Closed-Date:    Tue Nov 23 12:35:07 +0000 2021
>Last-Modified:  Tue Nov 23 12:35:07 +0000 2021
>Originator:     Claes Nstn
>Release:        trunk 2021-05-14
>Organization:
>Environment:
SunOS u40 5.10 Generic_147148-26 i86pc i386 i86pc

>Description:
Solaris prior to 5.11 does not have strnlen available, add it to the list of missing features to trigger use of libnbcompat where required.

See attached diff for proposed solution.
>How-To-Repeat:
Build a port with USE_FEATURES = strnlen
>Fix:
diff --git a/mk/platform/SunOS.mk b/mk/platform/SunOS.mk
index fc24dda23bd..ca212a241ab 100644
--- a/mk/platform/SunOS.mk
+++ b/mk/platform/SunOS.mk
@@ -72,6 +72,9 @@ _OPSYS_MISSING_FEATURES=asprintf
 .if !exists(/usr/include/err.h)
 _OPSYS_MISSING_FEATURES+=err
 .endif
+.if ${OS_VARIANT} == "Solaris" && (!empty(OS_VERSION:M5.[0-9]) || ${OS_VERSION} == "5.10")
+_OPSYS_MISSING_FEATURES+=strnlen
+.endif
 _PATCH_CAN_BACKUP=     yes             # native patch(1) can make backups
 _PATCH_BACKUP_ARG?=    -b -V simple -z # switch to patch(1) for backup suffix
 _USE_RPATH=            yes             # add rpath to LDFLAGS

>Release-Note:

>Audit-Trail:
From: =?utf-8?q?Claes_N=C3=A4st=C3=A9n?= <pekdon@gmail.com>
To: gnats-bugs <gnats-bugs@netbsd.org>
Cc: 
Subject: Re: pkg/56165: Add strnlen to _OPSYS_MISSING_FEATURES on Solaris < 5.11
Date: Tue, 23 Nov 2021 13:28:41 +0100

 Excerpts from gnats-admin's message of 2021-05-14 10:45:00 +0000:
 > Thank you very much for your problem report.
 > It has the internal identification `pkg/56165'.
 > The individual assigned to look at your
 > report is: pkg-manager. 
 > 
 > >Category:       pkg
 > >Responsible:    pkg-manager
 > >Synopsis:       Add strnlen to _OPSYS_MISSING_FEATURES on Solaris < 5.11
 > >Arrival-Date:   Fri May 14 10:45:00 +0000 2021

 This is a duplicate of 56511, both can be closed now.

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 23 Nov 2021 12:35:07 +0000
State-Changed-Why:
Duplicate of 56511


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.