Accepting request 1184763 from network:utilities

fix build with gcc 14

OBS-URL: https://build.opensuse.org/request/show/1184763
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libsmi?expand=0&rev=27
This commit is contained in:
Ana Guerrero 2024-07-02 16:15:04 +00:00 committed by Git OBS Bridge
commit ac17170661
3 changed files with 27 additions and 2 deletions

11
libsmi-c99.patch Normal file
View File

@ -0,0 +1,11 @@
--- a/lib/parser-sming.y
+++ b/lib/parser-sming.y
@@ -17,7 +17,7 @@
#ifdef BACKEND_SMING
-#define _ISOC99_SOURCE
+
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Jul 2 03:28:00 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* libsmi-c99.patch
+ fix build with gcc14 (boo#1225858)
+ Do not define _ISOC99_SOURCE in parser-sming.y, since
the timegm declaration in <time.h> is wrapped by
__GLIBC_USE(ISOC2X)
-------------------------------------------------------------------
Fri Mar 1 09:47:49 UTC 2024 - pgajdos@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package libsmi
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,6 +16,7 @@
#
%global make make
Name: libsmi
Version: 0.4.8
Release: 0
@ -30,6 +31,7 @@ Patch2: libsmi-CVE-2010-2891.patch
Patch3: libsmi-flex.patch
Patch4: libsmi-bison-3.0.patch
Patch5: libsmi-exports.patch
Patch6: libsmi-c99.patch
BuildRequires: bison
BuildRequires: flex
BuildRequires: libtool
@ -84,6 +86,7 @@ libsmi.
%endif
%patch -P 4 -p1
%patch -P 5 -p1
%patch -P 6 -p1
%build
autoreconf --force --install
@ -92,7 +95,7 @@ autoreconf --force --install
--enable-sming \
--with-mibdir=%{_datadir}/mibs
# Parallel build disabled
%make_build #%{?_smp_mflags}
%make #%{?_smp_mflags}
%install
%make_install