!4 fix warning "_BSD_SOURCE and _SVID_SOURCE are deprecated"

Merge pull request !4 from HuBin57/master
This commit is contained in:
openeuler-ci-bot 2022-01-19 09:19:10 +00:00 committed by Gitee
commit f79ac0ac8f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 37 additions and 2 deletions

View File

@ -0,0 +1,27 @@
From bb1357f9940a0597109a9233ae4e247a845f34ba Mon Sep 17 00:00:00 2001
From: hubin57 <hubin57@huawei.com>
Date: Mon, 17 Jan 2022 17:33:53 +0800
Subject: [PATCH] fix warning "_BSD_SOURCE and _SVID_SOURCE are deprecated"
Signed-off-by: hubin57 <hubin57@huawei.com>
---
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

View File

@ -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 <hubin57@huawei.com> - 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 <buildteam@openeuler.org> - 0.1.3-8
- Package init