summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2025-03-16 13:32:55 -0700
committerKhem Raj <raj.khem@gmail.com>2025-03-16 14:24:21 -0700
commit6d13c58e386d478b8788f440b7815cb866b9d6f0 (patch)
tree95707c24667f276c2fe11a95403480281853ac27
parent7e89f2c4dab3d6293a631a90170d4e9c1591ca84 (diff)
downloadmeta-openembedded-6d13c58e386d478b8788f440b7815cb866b9d6f0.tar.gz
procmail: Fix build with GCC-14
aids building on newer build hosts which now have moved to gcc-14 as well, so using cmdline option just for target compile is not enough as it runs tests using host compiler as well Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/procmail/procmail/gcc14.patch127
-rw-r--r--meta-oe/recipes-support/procmail/procmail_3.22.bb4
2 files changed, 130 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/procmail/procmail/gcc14.patch b/meta-oe/recipes-support/procmail/procmail/gcc14.patch
new file mode 100644
index 0000000000..5ca56fa006
--- /dev/null
+++ b/meta-oe/recipes-support/procmail/procmail/gcc14.patch
@@ -0,0 +1,127 @@
1From: Santiago Vila <sanvila@debian.org>
2Subject: Fix build with gcc-14
3Bug-Debian: https://bugs.debian.org/1075398
4
5Upstream-Status: Pending
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7--- a/initmake
8+++ b/initmake
9@@ -124,7 +124,7 @@ else
10 fi
11
12 cat >_autotst.c <<HERE
13-main()
14+int main()
15 { return 0;
16 }
17 HERE
18@@ -200,7 +200,7 @@ cat >_autotst.c <<HERE
19 #include <sys/types.h>
20 #include <stdio.h>
21 #include <sys/stat.h>
22-main()
23+int main()
24 { struct stat buf;return!&buf;
25 }
26 HERE
27--- a/src/autoconf
28+++ b/src/autoconf
29@@ -414,6 +414,12 @@ cat >_autotst.c <<HERE
30 int dolock,child[NR_of_forks],timeout,fdcollect;
31 char dirlocktest[]="_locktest";
32
33+#include <stdlib.h>
34+int killchildren();
35+int fdlock(int fd);
36+int sfdlock(int fd);
37+int fdunlock();
38+
39 void stimeout()
40 { timeout=1;close(fdcollect);killchildren();
41 }
42@@ -435,7 +441,7 @@ unsigned sfork()
43 return pid;
44 }
45
46-int main(argc,argv)char*argv[];
47+int main(int argc,char*argv[])
48 { int goodlock,testlock,i,pip[2],pipw[2];time_t otimet;unsigned dtimet;
49 static char filename[]="_locktst.l0";
50 close(0);goodlock=0;testlock=FIRST_lock;signal(SIGPIPE,SIG_DFL);
51@@ -585,13 +591,13 @@ int killchildren()
52 return 0;
53 }
54
55-int sfdlock(fd)
56+int sfdlock(int fd)
57 { int i;unsigned gobble[GOBBLE>>2];
58 for(i=GOBBLE>>2;i;gobble[--i]=~(unsigned)0); /* SunOS crash test */
59 return fdlock(fd);
60 }
61
62-static oldfdlock;
63+static int oldfdlock;
64 #ifdef F_SETLKW
65 static struct flock flck; /* why can't it be a local variable? */
66 #endif
67@@ -599,7 +605,7 @@ static struct flock flck; /* why can't
68 static off_t oldlockoffset;
69 #endif
70
71-int fdlock(fd)
72+int fdlock(int fd)
73 { int i;unsigned gobble[GOBBLE>>2];
74 for(i=GOBBLE>>2;i;gobble[--i]=~(unsigned)0); /* SunOS crash test */
75 oldfdlock=fd;fd=0;
76@@ -993,11 +999,11 @@ int main(){int i;i=1;
77 i+=WIFEXITED(i);
78 i+=WIFSTOPPED(i);
79 i+=WEXITSTATUS(i);
80- i+=WSIGTERM(i);
81+ i+=WTERMSIG(i);
82 return i;}
83 HERE
84
85-echo 'Testing for WIFEXITED(), WIFSTOPPED(), WEXITSTATUS() & WSIGTERM()'
86+echo 'Testing for WIFEXITED(), WIFSTOPPED(), WEXITSTATUS() & WTERMSIG()'
87 if $MAKE _autotst.$O >_autotst.rrr 2>&1
88 then
89 $FGREP -v include/ <_autotst.rrr >_autotst.$O
90@@ -1029,6 +1035,8 @@ cat >_autotst.c <<HERE
91 #ifndef NO_COMSAT
92 #include "network.h"
93 #endif
94+int setrgid();
95+int setresgid();
96 int main(){char a[2];
97 endpwent();endgrent();memmove(a,"0",1);bcopy("0",a,1);strcspn(a,"0");
98 strtol("0",(char**)0,10);strchr("0",'0');strpbrk(a,"0");rename(a,"0");
99@@ -1059,7 +1067,7 @@ echo 'Testing for memmove, strchr, strpb
100 echo ' rename, setrgid, setegid, pow, opendir, mkdir, waitpid, fsync,'
101 echo ' ftruncate, strtod, strncasecmp, strerror, strlcat,'
102 echo ' memset, bzero, and _exit'
103-if $MAKE _autotst.$O >$DEVNULL 2>&1
104+if $MAKE _autotst.$O >_autotst.rrr 2>&1
105 then
106 :
107 else
108@@ -1196,7 +1204,7 @@ unsigned long dobench(strstr,iter,haysta
109 return (unsigned long)clock()-to;
110 }
111 #endif
112-int main(argc,argv)int argc;const char*argv[];
113+int main(int argc,const char*argv[])
114 { if(argc==1)
115 { char*haystack;
116 #ifdef BENCHSIZE
117--- a/src/mailfold.c
118+++ b/src/mailfold.c
119@@ -378,7 +378,7 @@ void concon(ch)const int ch; /* flip b
120 }
121 }
122
123-void readmail(rhead,tobesent)const long tobesent;
124+void readmail(int rhead,const long tobesent)
125 { char*chp,*pastend;static size_t contlengthoffset;
126 ;{ long dfilled;
127 if(rhead==2) /* already read, just examine what we have */
diff --git a/meta-oe/recipes-support/procmail/procmail_3.22.bb b/meta-oe/recipes-support/procmail/procmail_3.22.bb
index 59b78c0a6a..32fc12c7da 100644
--- a/meta-oe/recipes-support/procmail/procmail_3.22.bb
+++ b/meta-oe/recipes-support/procmail/procmail_3.22.bb
@@ -15,6 +15,7 @@ SRC_URI = "http://www.ring.gr.jp/archives/net/mail/${BPN}/${BP}.tar.gz \
15 file://man-file-mailstat.1-from-debian.patch \ 15 file://man-file-mailstat.1-from-debian.patch \
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" 19"
19SRC_URI[sha256sum] = "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117" 20SRC_URI[sha256sum] = "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117"
20 21
@@ -24,6 +25,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a71e50e197a992c862379e576e669757 \
24 25
25DEPENDS = "libnet" 26DEPENDS = "libnet"
26inherit autotools-brokensep 27inherit autotools-brokensep
28
27do_configure() { 29do_configure() {
28 find examples -type f | xargs chmod 644 30 find examples -type f | xargs chmod 644
29 export CC="${BUILD_CC}" 31 export CC="${BUILD_CC}"
@@ -35,7 +37,7 @@ do_configure() {
35} 37}
36 38
37do_compile() { 39do_compile() {
38 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}" 40 oe_runmake -i CFLAGS="$TARGET_CFLAGS -Wno-comments -Wno-implicit-function-declaration -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS0="${LDFLAGS}"
39} 41}
40 42
41do_install() { 43do_install() {