diff options
author | Liu Yiding <liuyd.fnst@fujitsu.com> | 2025-06-10 09:27:54 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-06-09 21:24:07 -0700 |
commit | 1b421ef711e059ce54d03908e50b032f785d6a09 (patch) | |
tree | bddf6bddadfe893dda5213993daac97601d8946c | |
parent | 75dbba11ad2327f3014fcddf0ac2c27170c71e57 (diff) | |
download | meta-openembedded-1b421ef711e059ce54d03908e50b032f785d6a09.tar.gz |
procmail: fix compile failure with gcc-15
These failures doesn't broken compiling, but not generate files under /usr/bin
| userland@pumpkin3:/mnt/test/build_auh/tmp/work/core2-64-poky-linux/procmail/3.22/image/usr/bin$ ls
| formail lockfile mailstat procmail
part of error messages:
| In file included from recommend.c:6:
| includes.h:334:12: error: conflicting types for 'uname'; have 'int(void)'
| 334 | extern int uname(); /* so we fix it :-) /
| | ^~~~~
| In file included from sublib.c:13:
| includes.h:334:12: error: conflicting types for 'uname'; have 'int(void)'
| 334 | extern int uname(); / so we fix it :-) /
| | ^~~~~
| In file included from procmail.h:3,
| from procmail.c:20:
| includes.h:334:12: error: conflicting types for 'uname'; have 'int(void)'
| 334 | extern int uname(); / so we fix it :-) */
| | ^~~~~
| In file included from includes.h:67:
| /datadrive/ubinux/workdir/build-dir/202506/build-ubinux-armv8/tmp/work/aarch64-ubinux-linux/procmail/3.22/recipe-sysroot/usr/include/sys/utsname.h:81:12: note: previous declaration of 'uname' with type 'int(struct utsname *)'
| 81 | extern int uname (struct utsname *__name) _THROW;
| | ^~~~~
| In file included from includes.h:67:
| /datadrive/ubinux/workdir/build-dir/202506/build-ubinux-armv8/tmp/work/aarch64-ubinux-linux/procmail/3.22/recipe-sysroot/usr/include/sys/utsname.h:81:12: note: previous declaration of 'uname' with type 'int(struct utsname )'
| 81 | extern int uname (struct utsname _name) THROW;
| | ^~~~~
| In file included from includes.h:67:
| /datadrive/ubinux/workdir/build-dir/202506/build-ubinux-armv8/tmp/work/aarch64-ubinux-linux/procmail/3.22/recipe-sysroot/usr/include/sys/utsname.h:81:12: note: previous declaration of 'uname' with type 'int(struct utsname )'
| 81 | extern int uname (struct utsname __name) __THROW;
| | ^~~~~
| In file included from includes.h:67:
| /datadrive/ubinux/workdir/build-dir/202506/build-ubinux-armv8/tmp/work/aarch64-ubinux-linux/procmail/3.22/recipe-sysroot/usr/include/sys/utsname.h:81:12: note: previous declaration of 'uname' with type 'int(struct utsname )'
| 81 | extern int uname (struct utsname __name) __THROW;
| | ^~~~~
| recommend.c: In function 'main':
| recommend.c:15:5: warning: old-style function definition [-Wold-style-definition]
| 15 | int main(argc,argv)const int argc;const charconst argv[];
| | ^~~~
| procmail.c: In function 'savepass':
| procmail.c:71:22: warning: old-style function definition [-Wold-style-definition]
| 71 | static auth_identitysavepass(spass,uid)auth_identityconst spass;
| | ^~~~~~~~
| procmail.c:76:12: error: too many arguments to function 'auth_finduid'; expected 0, have 2
| 76 | if(tpass=auth_finduid(uid,0)) / save by copying */
| | ^~~~~~~~~~~~ ~~~
| In file included from procmail.c:36:
| authenticate.h:15:3: note: declared here
| 15 | auth_finduid Q((const uid_t uid,const int sock));
| | ^~~~~~~~~~~~
| procmail.c: In function 'main':
| procmail.c:97:5: warning: old-style function definition [-Wold-style-definition]
| 97 | int main(argc,argv)int argc;const charconst argv[];
| | ^~~~
| procmail.c:212:9: error: too many arguments to function 'checkprivFrom'; expected 0, have 3
| 212 | checkprivFrom(euid,passinvk?auth_username(passinvk):0,override);
| | ^~~~~~~~~~~~~~ ~~~~
| In file included from procmail.c:41:
| from.h:9:2: note: declared here
| 9 | checkprivFrom Q((uid_t euid,const charlogname,int override));
| | ^~~~~~~~~~~~~~
| procmail.c:213:9: error: too many arguments to function 'doumask'; expected 0, have 1
| 213 | doumask(INIT_UMASK); / allowed to set the From line? */
| | ^~~~~~~
Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 118 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/procmail/procmail/0001-fix-too-many-arguments-issue.patch b/meta-oe/recipes-support/procmail/procmail/0001-fix-too-many-arguments-issue.patch new file mode 100644 index 0000000000..9b98720b2e --- /dev/null +++ b/meta-oe/recipes-support/procmail/procmail/0001-fix-too-many-arguments-issue.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | From 6f00795de8623347580c4366cb517a6653f73ca4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Liu Yiding <liuyd.fnst@fujitsu.com> | ||
3 | Date: Mon, 9 Jun 2025 08:01:39 +0000 | ||
4 | Subject: [PATCH] fix too many arguments issue | ||
5 | |||
6 | fix issue like: | ||
7 | | procmail.c:76:12: error: too many arguments to function 'auth_finduid'; expected 0, have 2 | ||
8 | | 76 | if(tpass=auth_finduid(uid,0)) /* save by copying */ | ||
9 | | | ^~~~~~~~~~~~ ~~~ | ||
10 | | In file included from procmail.c:36: | ||
11 | | authenticate.h:15:3: note: declared here | ||
12 | | 15 | *auth_finduid Q((const uid_t uid,const int sock)); | ||
13 | | -- | ||
14 | | procmail.c:212:9: error: too many arguments to function 'checkprivFrom_'; expected 0, have 3 | ||
15 | | 212 | checkprivFrom_(euid,passinvk?auth_username(passinvk):0,override); | ||
16 | | | ^~~~~~~~~~~~~~ ~~~~ | ||
17 | | In file included from procmail.c:41: | ||
18 | | from.h:9:2: note: declared here | ||
19 | | 9 | checkprivFrom_ Q((uid_t euid,const char*logname,int override)); | ||
20 | | -- | ||
21 | | procmail.c:213:9: error: too many arguments to function 'doumask'; expected 0, have 1 | ||
22 | | 213 | doumask(INIT_UMASK); /* allowed to set the From_ line? */ | ||
23 | | | ^~~~~~~ | ||
24 | | In file included from procmail.c:23: | ||
25 | | robust.h:12:2: note: declared here | ||
26 | | 12 | doumask Q((const mode_t mask)); | ||
27 | |||
28 | Upstream-Status: Submitted [https://github.com/BuGlessRB/procmail/pull/11] | ||
29 | Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com> | ||
30 | --- | ||
31 | src/authenticate.h | 2 +- | ||
32 | src/exopen.c | 2 +- | ||
33 | src/includes.h | 2 +- | ||
34 | src/misc.h | 1 + | ||
35 | 4 files changed, 4 insertions(+), 3 deletions(-) | ||
36 | |||
37 | diff --git a/src/authenticate.h b/src/authenticate.h | ||
38 | index be9d88d..31e665a 100644 | ||
39 | --- a/src/authenticate.h | ||
40 | +++ b/src/authenticate.h | ||
41 | @@ -7,7 +7,7 @@ typedef struct auth_identity auth_identity; | ||
42 | |||
43 | #ifndef P | ||
44 | #define P(x) x | ||
45 | -#define Q(x) () | ||
46 | +#define Q(x) x | ||
47 | #endif | ||
48 | |||
49 | /*const*/auth_identity | ||
50 | diff --git a/src/exopen.c b/src/exopen.c | ||
51 | index c7647e5..46e3467 100644 | ||
52 | --- a/src/exopen.c | ||
53 | +++ b/src/exopen.c | ||
54 | @@ -51,7 +51,7 @@ static const char*safehost P((void)) /* return a hostname safe for filenames */ | ||
55 | return sname; | ||
56 | } | ||
57 | |||
58 | -int unique(full,p,len,mode,verbos,flags)char*const full;char*p; | ||
59 | +int unique(full,p,len,mode,verbos,flags)const char*const full;char*p; | ||
60 | const size_t len;const mode_t mode;const int verbos,flags; | ||
61 | { static const char s2c[]=".,+%";static int serial=STRLEN(s2c); | ||
62 | static time_t t;char*dot,*end,*host;struct stat filebuf; | ||
63 | diff --git a/src/includes.h b/src/includes.h | ||
64 | index 7d6b41f..134805b 100644 | ||
65 | --- a/src/includes.h | ||
66 | +++ b/src/includes.h | ||
67 | @@ -530,7 +530,7 @@ extern void*memmove(); | ||
68 | * problems caused by one of those types being shorter than int and thereby | ||
69 | * being passed differently under ANSI rules. | ||
70 | */ | ||
71 | -#define Q(args) () | ||
72 | +#define Q(args) args | ||
73 | |||
74 | #ifdef oBRAIN_DAMAGE | ||
75 | #undef oBRAIN_DAMAGE | ||
76 | diff --git a/src/misc.h b/src/misc.h | ||
77 | index 4f62ebc..659dfcb 100644 | ||
78 | --- a/src/misc.h | ||
79 | +++ b/src/misc.h | ||
80 | @@ -1,4 +1,5 @@ | ||
81 | /*$Id: misc.h,v 1.56 2001/06/30 01:14:19 guenther Exp $*/ | ||
82 | +#include "authenticate.h" | ||
83 | |||
84 | struct dyna_array{int filled,tspace;char*vals;}; | ||
85 | union offori{off_t o;int i;}; | ||
86 | -- | ||
87 | 2.43.0 | ||
88 | |||
diff --git a/meta-oe/recipes-support/procmail/procmail/0001-fix-uname-declaration.patch b/meta-oe/recipes-support/procmail/procmail/0001-fix-uname-declaration.patch new file mode 100644 index 0000000000..adbc4f584a --- /dev/null +++ b/meta-oe/recipes-support/procmail/procmail/0001-fix-uname-declaration.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From a9e57d4048c94f6bc2533ccc41e6c35d4416571a Mon Sep 17 00:00:00 2001 | ||
2 | From: Liu Yiding <liuyd.fnst@fujitsu.com> | ||
3 | Date: Mon, 9 Jun 2025 06:44:06 +0000 | ||
4 | Subject: [PATCH] fix uname declaration | ||
5 | |||
6 | Upstream-Status: Submitted [https://github.com/BuGlessRB/procmail/pull/11] | ||
7 | Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com> | ||
8 | --- | ||
9 | src/includes.h | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/src/includes.h b/src/includes.h | ||
13 | index 4466907..7d6b41f 100644 | ||
14 | --- a/src/includes.h | ||
15 | +++ b/src/includes.h | ||
16 | @@ -331,7 +331,7 @@ extern int errno; | ||
17 | |||
18 | #ifndef NOuname | ||
19 | #ifndef P /* SINIX V5.23 has the wrong prototype for uname() */ | ||
20 | -extern int uname(); /* so we fix it :-) */ | ||
21 | +extern int uname(struct utsname *); | ||
22 | #define Uname(name) ((int(*)(struct utsname*))uname)(name) | ||
23 | #else | ||
24 | #define Uname(name) uname(name) /* no fix needed */ | ||
25 | -- | ||
26 | 2.43.0 | ||
27 | |||
diff --git a/meta-oe/recipes-support/procmail/procmail_3.22.bb b/meta-oe/recipes-support/procmail/procmail_3.22.bb index 86d75e8c7c..47c8310eaf 100644 --- a/meta-oe/recipes-support/procmail/procmail_3.22.bb +++ b/meta-oe/recipes-support/procmail/procmail_3.22.bb | |||
@@ -16,6 +16,8 @@ SRC_URI = "http://www.ring.gr.jp/archives/net/mail/${BPN}/${BP}.tar.gz \ | |||
16 | file://CVE-2014-3618.patch \ | 16 | file://CVE-2014-3618.patch \ |
17 | file://CVE-2017-16844.patch \ | 17 | file://CVE-2017-16844.patch \ |
18 | file://gcc14.patch \ | 18 | file://gcc14.patch \ |
19 | file://0001-fix-uname-declaration.patch \ | ||
20 | file://0001-fix-too-many-arguments-issue.patch \ | ||
19 | " | 21 | " |
20 | SRC_URI[sha256sum] = "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117" | 22 | SRC_URI[sha256sum] = "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117" |
21 | 23 | ||
@@ -37,7 +39,7 @@ do_configure() { | |||
37 | } | 39 | } |
38 | 40 | ||
39 | do_compile() { | 41 | do_compile() { |
40 | oe_runmake -i CFLAGS="$TARGET_CFLAGS -Wno-comments -Wno-implicit-int -Wno-implicit-function-declaration -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS0="${LDFLAGS}" | 42 | oe_runmake -i CFLAGS="$TARGET_CFLAGS -Wno-comments -Wno-implicit-int -Wno-implicit-function-declaration -Wno-incompatible-pointer-types -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS0="${LDFLAGS}" |
41 | } | 43 | } |
42 | 44 | ||
43 | do_install() { | 45 | do_install() { |