From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DBA83158094 for ; Thu, 8 Sep 2022 03:56:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 15601E07C5; Thu, 8 Sep 2022 03:56:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EFBD1E07C5 for ; Thu, 8 Sep 2022 03:56:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CC1A633E01A for ; Thu, 8 Sep 2022 03:56:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 064A4526 for ; Thu, 8 Sep 2022 03:56:25 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1662609369.2360d9ea66979cfa5aa408ea50928074ce7ab8af.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libsmi/files/, net-libs/libsmi/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/libsmi/files/libsmi-0.5.0-implicit-function-declarations.patch net-libs/libsmi/libsmi-0.5.0-r2.ebuild X-VCS-Directories: net-libs/libsmi/files/ net-libs/libsmi/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 2360d9ea66979cfa5aa408ea50928074ce7ab8af X-VCS-Branch: master Date: Thu, 8 Sep 2022 03:56:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 826b8ffa-9b7c-4327-b583-2ee12c79d497 X-Archives-Hash: 6dc650353928493e3a39b3128995c419 commit: 2360d9ea66979cfa5aa408ea50928074ce7ab8af Author: Nicholas Vinson gmail com> AuthorDate: Thu Sep 8 03:54:03 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu Sep 8 03:56:09 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2360d9ea net-libs/libsmi: fix build with Clang 15 (implicit function declarations) Signed-off-by: Nicholas Vinson gmail.com> Signed-off-by: Sam James gentoo.org> ...bsmi-0.5.0-implicit-function-declarations.patch | 74 ++++++++++++++++++++++ net-libs/libsmi/libsmi-0.5.0-r2.ebuild | 38 +++++++++++ 2 files changed, 112 insertions(+) diff --git a/net-libs/libsmi/files/libsmi-0.5.0-implicit-function-declarations.patch b/net-libs/libsmi/files/libsmi-0.5.0-implicit-function-declarations.patch new file mode 100644 index 000000000000..f0d52e4ae000 --- /dev/null +++ b/net-libs/libsmi/files/libsmi-0.5.0-implicit-function-declarations.patch @@ -0,0 +1,74 @@ +From: Nicholas Vinson +To: libsmi@ibr.cs.tu-bs.de +Cc: Nicholas Vinson +Subject: Implicit function declaration patch + +When building libsmi with clang 15.0.0, clang fails to build due to +errors similar to: + +call to undeclared function 'smiyyerror'; ISO C99 and later do not support +implicit function declarations + +This patch corrects those issues by introducing the needed +declarations defore the function call. + +Thanks, +Nicholas Vinson + +--- a/lib/yang-data.h ++++ b/lib/yang-data.h +@@ -158,10 +158,12 @@ _YangIdentifierRef *listIdentifierRef(Y + /* + * Node and Module functions + */ + _YangNode *addYangNode(const char *value, YangDecl nodeKind, _YangNode *parentPtr); + ++void createIdentifierRef(_YangNode *node, char* prefix, char* ident); ++ + int removeYangNode(_YangNode* target, _YangNode* child); + + _YangModuleInfo *createModuleInfo(_YangNode *modulePtr); + + void createTypeInfo(_YangNode *node); +--- a/lib/parser-yang.y ++++ b/lib/parser-yang.y +@@ -19,10 +19,15 @@ + #include + + #ifdef BACKEND_YANG + + #define _ISOC99_SOURCE ++/* define _DEFAULT_SOURCE to get timegm() */ ++#define _DEFAULT_SOURCE 1 ++/* define _BSD_SOURCE & _SVID_SOURCE for backwards compatibility */ ++#define _BSD_SOURCE 1 ++#define _SVID_SOURCE 1 + #include + #include + #include + #include + #include +@@ -44,10 +44,11 @@ + #include "parser-yang.h" + #include "scanner-yang.h" + #include "yang-complex-types.h" + #include "util.h" + #include "error.h" ++#include "yang-check.h" + + #ifdef HAVE_DMALLOC_H + #include + #endif + +--- a/lib/error.h ++++ b/lib/error.h +@@ -40,6 +40,8 @@ extern char* smiGetErrorMsg(int id); + + extern void smiPrintError(Parser *parser, int id, ...); + + extern void smiPrintErrorAtLine(Parser *parser, int id, int line, ...); + ++#include "smi-check.h" ++ + #endif /* _ERROR_H */ + diff --git a/net-libs/libsmi/libsmi-0.5.0-r2.ebuild b/net-libs/libsmi/libsmi-0.5.0-r2.ebuild new file mode 100644 index 000000000000..1473aeacf5c6 --- /dev/null +++ b/net-libs/libsmi/libsmi-0.5.0-r2.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="A Library to Access SMI MIB Information" +HOMEPAGE="https://www.ibr.cs.tu-bs.de/projects/libsmi/" +SRC_URI="https://www.ibr.cs.tu-bs.de/projects/libsmi/download/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="static-libs" +RESTRICT="test" + +PATCHES=( + "${FILESDIR}"/${PN}-0.5.0-implicit-function-declarations.patch +) + +src_configure() { + econf $(use_enable static-libs static) +} + +src_test() { + # sming test is known to fail and some other fail if LC_ALL!=C: + # https://mail.ibr.cs.tu-bs.de/pipermail/libsmi/2008-March/001014.html + sed -i '/^[[:space:]]*smidump-sming.test \\$/d' test/Makefile + LC_ALL=C emake -j1 check +} + +src_install() { + default + + dodoc ANNOUNCE ChangeLog README THANKS TODO \ + doc/{*.txt,smi.dia,smi.dtd,smi.xsd} smi.conf-example + + find "${ED}" -name '*.la' -delete || die +}