!8 fix build error with gcc 10

From: @eaglegai
Reviewed-by: @zengwefeng
Signed-off-by: @zengwefeng
This commit is contained in:
openeuler-ci-bot 2021-07-30 06:32:59 +00:00 committed by Gitee
commit c0603fa3be
2 changed files with 61 additions and 1 deletions

View File

@ -0,0 +1,52 @@
From d40744a7c85af615d5a3bf3db382d35c50f1c508 Mon Sep 17 00:00:00 2001
From: Wietse Venema <wietse@porcupine.org>
Date: Sun, 26 Jan 2020 00:00:00 -0500
Subject: [PATCH] postfix-3.5-20200126
Cleanup: missing 'extern' declarations in some header files.
Eray Aslan. Files: postconf/postconf.h,smtpd/smtpd_expand.h,
trivial-rewrite/trivial-rewrite.h
---
postfix/src/postconf/postconf.h | 2 +-
postfix/src/smtpd/smtpd_expand.h | 2 +-
postfix/src/trivial-rewrite/trivial-rewrite.h | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/postconf/postconf.h b/src/postconf/postconf.h
index 0f4764875..7b23380a5 100644
--- a/src/postconf/postconf.h
+++ b/src/postconf/postconf.h
@@ -152,7 +152,7 @@ typedef struct {
* Lookup table for master.cf entries. The table is terminated with an entry
* that has a null argv member.
*/
-PCF_MASTER_ENT *pcf_master_table;
+extern PCF_MASTER_ENT *pcf_master_table;
/*
* Line-wrapping support.
diff --git a/src/smtpd/smtpd_expand.h b/src/smtpd/smtpd_expand.h
index 71d705c01..3680036a0 100644
--- a/src/smtpd/smtpd_expand.h
+++ b/src/smtpd/smtpd_expand.h
@@ -18,7 +18,7 @@
/*
* External interface.
*/
-VSTRING *smtpd_expand_filter;
+extern VSTRING *smtpd_expand_filter;
void smtpd_expand_init(void);
const char *smtpd_expand_lookup(const char *, int, void *);
int smtpd_expand(SMTPD_STATE *, VSTRING *, const char *, int);
diff --git a/src/trivial-rewrite/trivial-rewrite.h b/src/trivial-rewrite/trivial-rewrite.h
index bf0dd4a08..42016efb0 100644
--- a/src/trivial-rewrite/trivial-rewrite.h
+++ b/src/trivial-rewrite/trivial-rewrite.h
@@ -23,7 +23,7 @@
/*
* Connection management.
*/
-int server_flags;
+extern int server_flags;
/*
* rewrite.c

View File

@ -23,7 +23,7 @@
Name: postfix
Summary: Postfix Mail Transport Agent
Version: 3.3.1
Release: 12
Release: 13
Epoch: 2
URL: http://www.postfix.org
License: (IPL-1.0 and GPLv2+) or (EPL-2.0 and GPLv2+)
@ -44,6 +44,7 @@ Patch5: pflogsumm-1.1.5-datecalc.patch
Patch6: pflogsumm-1.1.5-ipv6-warnings-fix.patch
Patch7: fix-postfix-build-failed.patch
Patch8: fix-build-error-with_glibc2.30-ftbfs.patch
Patch9: fix-multiple-definition-error-with-gcc-10.patch
BuildRequires: libdb-devel perl-generators pkgconfig zlib-devel systemd-units libicu-devel libnsl2-devel gcc m4 openldap-devel
BuildRequires: cyrus-sasl-devel pcre-devel mariadb-connector-c-devel postgresql-devel sqlite-devel openssl-devel procps-ng
@ -105,6 +106,7 @@ PostgreSQL maps with Postfix, you need this.
%patch7 -p1
%patch8 -p1
%patch9 -p1
sed -i \
's|^\(\s*#define\s\+DEF_SHLIB_DIR\s\+\)"/usr/lib/postfix"|\1"%{_libdir}/postfix"|' \
@ -490,6 +492,12 @@ fi
%{postfix_doc_dir}/README_FILES/*
%changelog
* Fri Jul 30 2021 gaihuiying <gaihuiying1@huawei.com> - 2:3.3.1-13
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix build error with gcc 10
* Fri Feb 05 2021 caodongxia <caodongxia@huawei.com> - 2:3.3.1-12
- Decouple the deprecated package tinycdb by removing subpackage postfix-cdb