From 771a71d0c9d6ecb24c7a371242c2c85f78f85d9a Mon Sep 17 00:00:00 2001 From: hubin Date: Mon, 17 Jan 2022 19:16:29 +0800 Subject: [PATCH] fix warning "_BSD_SOURCE and _SVID_SOURCE are deprecated" Signed-off-by: hubin --- ..._SOURCE-and-_SVID_SOURCE-are-depreca.patch | 27 +++++++++++++++++++ libmetalink.spec | 12 +++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 0001-fix-warning-_BSD_SOURCE-and-_SVID_SOURCE-are-depreca.patch diff --git a/0001-fix-warning-_BSD_SOURCE-and-_SVID_SOURCE-are-depreca.patch b/0001-fix-warning-_BSD_SOURCE-and-_SVID_SOURCE-are-depreca.patch new file mode 100644 index 0000000..a9480ac --- /dev/null +++ b/0001-fix-warning-_BSD_SOURCE-and-_SVID_SOURCE-are-depreca.patch @@ -0,0 +1,27 @@ +From bb1357f9940a0597109a9233ae4e247a845f34ba Mon Sep 17 00:00:00 2001 +From: hubin57 +Date: Mon, 17 Jan 2022 17:33:53 +0800 +Subject: [PATCH] fix warning "_BSD_SOURCE and _SVID_SOURCE are deprecated" + +Signed-off-by: hubin57 +--- + lib/metalink_config.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/metalink_config.h b/lib/metalink_config.h +index 1ff7ddb..de53823 100644 +--- a/lib/metalink_config.h ++++ b/lib/metalink_config.h +@@ -33,8 +33,8 @@ + #ifndef _XOPEN_SOURCE + # define _XOPEN_SOURCE /* avoid warning when using strptime */ + #endif +-#ifndef _BSD_SOURCE +-# define _BSD_SOURCE /* avoid warning when using timegm */ ++#ifndef _DEFAULT_SOURCE ++# define _DEFAULT_SOURCE /* avoid warning when using timegm */ + #endif + #ifndef _NETBSD_SOURCE + # define _NETBSD_SOURCE /* avoid warning when using strtoll on netbsd */ +-- +2.27.0 diff --git a/libmetalink.spec b/libmetalink.spec index 8295163..3d6d177 100644 --- a/libmetalink.spec +++ b/libmetalink.spec @@ -1,6 +1,6 @@ Name: libmetalink Version: 0.1.3 -Release: 8 +Release: 9 Summary: Metalink library written in C License: MIT URL: https://launchpad.net/libmetalink @@ -8,6 +8,8 @@ Source0: https://launchpad.net/libmetalink/trunk/%{name}-%{version}/+download/%{ BuildRequires: gcc expat-devel CUnit-devel +Patch000:0001-fix-warning-_BSD_SOURCE-and-_SVID_SOURCE-are-depreca.patch + %description libmetalink is a Metalink library written in C language. It is intended to provide the programs written in C to add Metalink functionality such as @@ -26,7 +28,7 @@ Requires: %{name} = %{version}-%{release} The %{name}-doc package contains document files. %prep -%setup -q +%autosetup -p1 %build %configure --disable-static @@ -58,5 +60,11 @@ make check %{_mandir}/man3/* %changelog +* Mon Jan 17 2022 Hu Bin - 0.1.3-9 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix warning "_BSD_SOURCE and _SVID_SOURCE are deprecated" + * Tue Sep 10 2019 openEuler Buildteam - 0.1.3-8 - Package init