diff mbox series

[meta-oe,4/4] procmail: Fix build with GCC-14

Message ID 20250316212656.3179516-4-raj.khem@gmail.com
State New
Headers show
Series [meta-oe,1/4] enca: Fix cross builds | expand

Commit Message

Khem Raj March 16, 2025, 9:26 p.m. UTC
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>
---
 .../procmail/procmail/gcc14.patch             | 127 ++++++++++++++++++
 .../recipes-support/procmail/procmail_3.22.bb |   4 +-
 2 files changed, 130 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/procmail/procmail/gcc14.patch

Comments

Wang Mingyu April 28, 2025, 9:02 a.m. UTC | #1
>  do_compile() {
> -    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}"
> +    oe_runmake -i CFLAGS="$TARGET_CFLAGS -Wno-comments
> -Wno-implicit-function-declaration -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64" LDFLAGS0="${LDFLAGS}"

-Wno-implicit-int cannot be deleted. 
Because although bitbake did not exit, if this option is removed, do_compile will reveal an error that caused procmail to not generate.
You can check log.do.compile to confirm this issue.

  --
Best Regards
---------------------------------------------------
Wang Mingyu
FUJITSU NANJING SOFTWARE TECHNOLOGY CO., LTD. (FNST)
No.6 Wenzhu Road, Nanjing, 210012, China
TEL:+86+25-86630566--8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: wangmy@fujitsu.com

> -----Original Message-----
> From: openembedded-devel@lists.openembedded.org
> <openembedded-devel@lists.openembedded.org> On Behalf Of Khem Raj via
> lists.openembedded.org
> Sent: Monday, March 17, 2025 5:27 AM
> To: openembedded-devel@lists.openembedded.org
> Cc: Khem Raj <raj.khem@gmail.com>
> Subject: [oe] [meta-oe][PATCH 4/4] 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>
> ---
>  .../procmail/procmail/gcc14.patch             | 127
> ++++++++++++++++++
>  .../recipes-support/procmail/procmail_3.22.bb |   4 +-
>  2 files changed, 130 insertions(+), 1 deletion(-)  create mode 100644
> meta-oe/recipes-support/procmail/procmail/gcc14.patch
> 
> 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 @@
> +From: Santiago Vila <sanvila@debian.org>
> +Subject: Fix build with gcc-14
> +Bug-Debian: https://bugs.debian.org/1075398
> +
> +Upstream-Status: Pending
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +--- a/initmake
> ++++ b/initmake
> +@@ -124,7 +124,7 @@ else
> + fi
> +
> + cat >_autotst.c <<HERE
> +-main()
> ++int main()
> + { return 0;
> + }
> + HERE
> +@@ -200,7 +200,7 @@ cat >_autotst.c <<HERE  #include <sys/types.h>
> +#include <stdio.h>  #include <sys/stat.h>
> +-main()
> ++int main()
> + { struct stat buf;return!&buf;
> + }
> + HERE
> +--- a/src/autoconf
> ++++ b/src/autoconf
> +@@ -414,6 +414,12 @@ cat >_autotst.c <<HERE  int
> +dolock,child[NR_of_forks],timeout,fdcollect;
> + char dirlocktest[]="_locktest";
> +
> ++#include <stdlib.h>
> ++int killchildren();
> ++int fdlock(int fd);
> ++int sfdlock(int fd);
> ++int fdunlock();
> ++
> + void stimeout()
> + { timeout=1;close(fdcollect);killchildren();
> + }
> +@@ -435,7 +441,7 @@ unsigned sfork()
> +   return pid;
> + }
> +
> +-int main(argc,argv)char*argv[];
> ++int main(int argc,char*argv[])
> + { int goodlock,testlock,i,pip[2],pipw[2];time_t otimet;unsigned dtimet;
> +   static char filename[]="_locktst.l0";
> +   close(0);goodlock=0;testlock=FIRST_lock;signal(SIGPIPE,SIG_DFL);
> +@@ -585,13 +591,13 @@ int killchildren()
> +   return 0;
> + }
> +
> +-int sfdlock(fd)
> ++int sfdlock(int fd)
> + { int i;unsigned gobble[GOBBLE>>2];
> +   for(i=GOBBLE>>2;i;gobble[--i]=~(unsigned)0);		 /* SunOS crash
> test */
> +   return fdlock(fd);
> + }
> +
> +-static oldfdlock;
> ++static int oldfdlock;
> + #ifdef F_SETLKW
> + static struct flock flck;		/* why can't it be a local variable? */
> + #endif
> +@@ -599,7 +605,7 @@ static struct flock flck;		/* why can't
> + static off_t oldlockoffset;
> + #endif
> +
> +-int fdlock(fd)
> ++int fdlock(int fd)
> + { int i;unsigned gobble[GOBBLE>>2];
> +   for(i=GOBBLE>>2;i;gobble[--i]=~(unsigned)0);		 /* SunOS crash
> test */
> +   oldfdlock=fd;fd=0;
> +@@ -993,11 +999,11 @@ int main(){int i;i=1;
> +  i+=WIFEXITED(i);
> +  i+=WIFSTOPPED(i);
> +  i+=WEXITSTATUS(i);
> +- i+=WSIGTERM(i);
> ++ i+=WTERMSIG(i);
> +  return i;}
> + HERE
> +
> +-echo 'Testing for WIFEXITED(), WIFSTOPPED(), WEXITSTATUS() & WSIGTERM()'
> ++echo 'Testing for WIFEXITED(), WIFSTOPPED(), WEXITSTATUS() &
> WTERMSIG()'
> + if $MAKE _autotst.$O >_autotst.rrr 2>&1  then
> +    $FGREP -v include/ <_autotst.rrr >_autotst.$O @@ -1029,6 +1035,8 @@
> +cat >_autotst.c <<HERE  #ifndef NO_COMSAT  #include "network.h"
> + #endif
> ++int setrgid();
> ++int setresgid();
> + int main(){char a[2];
> +  endpwent();endgrent();memmove(a,"0",1);bcopy("0",a,1);strcspn(a,"0");
> +
> +strtol("0",(char**)0,10);strchr("0",'0');strpbrk(a,"0");rename(a,"0");
> +@@ -1059,7 +1067,7 @@ echo 'Testing for memmove, strchr, strpb
> + echo '	rename, setrgid, setegid, pow, opendir, mkdir, waitpid, fsync,'
> + echo '	ftruncate, strtod, strncasecmp, strerror, strlcat,'
> + echo '	memset, bzero, and _exit'
> +-if $MAKE _autotst.$O >$DEVNULL 2>&1
> ++if $MAKE _autotst.$O >_autotst.rrr 2>&1
> + then
> + :
> + else
> +@@ -1196,7 +1204,7 @@ unsigned long dobench(strstr,iter,haysta
> +   return (unsigned long)clock()-to;
> + }
> + #endif
> +-int main(argc,argv)int argc;const char*argv[];
> ++int main(int argc,const char*argv[])
> + { if(argc==1)
> +    { char*haystack;
> + #ifdef BENCHSIZE
> +--- a/src/mailfold.c
> ++++ b/src/mailfold.c
> +@@ -378,7 +378,7 @@ void concon(ch)const int ch;   /* flip b
> +    }
> + }
> +
> +-void readmail(rhead,tobesent)const long tobesent;
> ++void readmail(int rhead,const long tobesent)
> + { char*chp,*pastend;static size_t contlengthoffset;
> +   ;{ long dfilled;
> +      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 \
>      file://man-file-mailstat.1-from-debian.patch \
>      file://CVE-2014-3618.patch \
>      file://CVE-2017-16844.patch \
> +    file://gcc14.patch \
>  "
>  SRC_URI[sha256sum] =
> "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117"
> 
> @@ -24,6 +25,7 @@ LIC_FILES_CHKSUM =
> "file://COPYING;md5=a71e50e197a992c862379e576e669757 \
> 
>  DEPENDS = "libnet"
>  inherit autotools-brokensep
> +
>  do_configure() {
>      find examples -type f | xargs chmod 644
>      export CC="${BUILD_CC}"
> @@ -35,7 +37,7 @@ do_configure() {
>  }
> 
>  do_compile() {
> -    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}"
> +    oe_runmake -i CFLAGS="$TARGET_CFLAGS -Wno-comments
> -Wno-implicit-function-declaration -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64" LDFLAGS0="${LDFLAGS}"
>  }
> 
>  do_install() {
Khem Raj April 28, 2025, 2 p.m. UTC | #2
On Mon, Apr 28, 2025 at 2:02 AM Mingyu Wang (Fujitsu)
<wangmy@fujitsu.com> wrote:
>
> >  do_compile() {
> > -    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}"
> > +    oe_runmake -i CFLAGS="$TARGET_CFLAGS -Wno-comments
> > -Wno-implicit-function-declaration -D_LARGEFILE_SOURCE
> > -D_FILE_OFFSET_BITS=64" LDFLAGS0="${LDFLAGS}"
>
> -Wno-implicit-int cannot be deleted.
> Because although bitbake did not exit, if this option is removed, do_compile will reveal an error that caused procmail to not generate.
> You can check log.do.compile to confirm this issue.

interesting. Please send a patch to reinstate it.?

>
>   --
> Best Regards
> ---------------------------------------------------
> Wang Mingyu
> FUJITSU NANJING SOFTWARE TECHNOLOGY CO., LTD. (FNST)
> No.6 Wenzhu Road, Nanjing, 210012, China
> TEL:+86+25-86630566--8568
> COINS: 79988548
> FAX: +86+25-83317685
> MAIL: wangmy@fujitsu.com
>
> > -----Original Message-----
> > From: openembedded-devel@lists.openembedded.org
> > <openembedded-devel@lists.openembedded.org> On Behalf Of Khem Raj via
> > lists.openembedded.org
> > Sent: Monday, March 17, 2025 5:27 AM
> > To: openembedded-devel@lists.openembedded.org
> > Cc: Khem Raj <raj.khem@gmail.com>
> > Subject: [oe] [meta-oe][PATCH 4/4] 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>
> > ---
> >  .../procmail/procmail/gcc14.patch             | 127
> > ++++++++++++++++++
> >  .../recipes-support/procmail/procmail_3.22.bb |   4 +-
> >  2 files changed, 130 insertions(+), 1 deletion(-)  create mode 100644
> > meta-oe/recipes-support/procmail/procmail/gcc14.patch
> >
> > 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 @@
> > +From: Santiago Vila <sanvila@debian.org>
> > +Subject: Fix build with gcc-14
> > +Bug-Debian: https://bugs.debian.org/1075398
> > +
> > +Upstream-Status: Pending
> > +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > +--- a/initmake
> > ++++ b/initmake
> > +@@ -124,7 +124,7 @@ else
> > + fi
> > +
> > + cat >_autotst.c <<HERE
> > +-main()
> > ++int main()
> > + { return 0;
> > + }
> > + HERE
> > +@@ -200,7 +200,7 @@ cat >_autotst.c <<HERE  #include <sys/types.h>
> > +#include <stdio.h>  #include <sys/stat.h>
> > +-main()
> > ++int main()
> > + { struct stat buf;return!&buf;
> > + }
> > + HERE
> > +--- a/src/autoconf
> > ++++ b/src/autoconf
> > +@@ -414,6 +414,12 @@ cat >_autotst.c <<HERE  int
> > +dolock,child[NR_of_forks],timeout,fdcollect;
> > + char dirlocktest[]="_locktest";
> > +
> > ++#include <stdlib.h>
> > ++int killchildren();
> > ++int fdlock(int fd);
> > ++int sfdlock(int fd);
> > ++int fdunlock();
> > ++
> > + void stimeout()
> > + { timeout=1;close(fdcollect);killchildren();
> > + }
> > +@@ -435,7 +441,7 @@ unsigned sfork()
> > +   return pid;
> > + }
> > +
> > +-int main(argc,argv)char*argv[];
> > ++int main(int argc,char*argv[])
> > + { int goodlock,testlock,i,pip[2],pipw[2];time_t otimet;unsigned dtimet;
> > +   static char filename[]="_locktst.l0";
> > +   close(0);goodlock=0;testlock=FIRST_lock;signal(SIGPIPE,SIG_DFL);
> > +@@ -585,13 +591,13 @@ int killchildren()
> > +   return 0;
> > + }
> > +
> > +-int sfdlock(fd)
> > ++int sfdlock(int fd)
> > + { int i;unsigned gobble[GOBBLE>>2];
> > +   for(i=GOBBLE>>2;i;gobble[--i]=~(unsigned)0);               /* SunOS crash
> > test */
> > +   return fdlock(fd);
> > + }
> > +
> > +-static oldfdlock;
> > ++static int oldfdlock;
> > + #ifdef F_SETLKW
> > + static struct flock flck;           /* why can't it be a local variable? */
> > + #endif
> > +@@ -599,7 +605,7 @@ static struct flock flck;                /* why can't
> > + static off_t oldlockoffset;
> > + #endif
> > +
> > +-int fdlock(fd)
> > ++int fdlock(int fd)
> > + { int i;unsigned gobble[GOBBLE>>2];
> > +   for(i=GOBBLE>>2;i;gobble[--i]=~(unsigned)0);               /* SunOS crash
> > test */
> > +   oldfdlock=fd;fd=0;
> > +@@ -993,11 +999,11 @@ int main(){int i;i=1;
> > +  i+=WIFEXITED(i);
> > +  i+=WIFSTOPPED(i);
> > +  i+=WEXITSTATUS(i);
> > +- i+=WSIGTERM(i);
> > ++ i+=WTERMSIG(i);
> > +  return i;}
> > + HERE
> > +
> > +-echo 'Testing for WIFEXITED(), WIFSTOPPED(), WEXITSTATUS() & WSIGTERM()'
> > ++echo 'Testing for WIFEXITED(), WIFSTOPPED(), WEXITSTATUS() &
> > WTERMSIG()'
> > + if $MAKE _autotst.$O >_autotst.rrr 2>&1  then
> > +    $FGREP -v include/ <_autotst.rrr >_autotst.$O @@ -1029,6 +1035,8 @@
> > +cat >_autotst.c <<HERE  #ifndef NO_COMSAT  #include "network.h"
> > + #endif
> > ++int setrgid();
> > ++int setresgid();
> > + int main(){char a[2];
> > +  endpwent();endgrent();memmove(a,"0",1);bcopy("0",a,1);strcspn(a,"0");
> > +
> > +strtol("0",(char**)0,10);strchr("0",'0');strpbrk(a,"0");rename(a,"0");
> > +@@ -1059,7 +1067,7 @@ echo 'Testing for memmove, strchr, strpb
> > + echo '      rename, setrgid, setegid, pow, opendir, mkdir, waitpid, fsync,'
> > + echo '      ftruncate, strtod, strncasecmp, strerror, strlcat,'
> > + echo '      memset, bzero, and _exit'
> > +-if $MAKE _autotst.$O >$DEVNULL 2>&1
> > ++if $MAKE _autotst.$O >_autotst.rrr 2>&1
> > + then
> > + :
> > + else
> > +@@ -1196,7 +1204,7 @@ unsigned long dobench(strstr,iter,haysta
> > +   return (unsigned long)clock()-to;
> > + }
> > + #endif
> > +-int main(argc,argv)int argc;const char*argv[];
> > ++int main(int argc,const char*argv[])
> > + { if(argc==1)
> > +    { char*haystack;
> > + #ifdef BENCHSIZE
> > +--- a/src/mailfold.c
> > ++++ b/src/mailfold.c
> > +@@ -378,7 +378,7 @@ void concon(ch)const int ch;   /* flip b
> > +    }
> > + }
> > +
> > +-void readmail(rhead,tobesent)const long tobesent;
> > ++void readmail(int rhead,const long tobesent)
> > + { char*chp,*pastend;static size_t contlengthoffset;
> > +   ;{ long dfilled;
> > +      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 \
> >      file://man-file-mailstat.1-from-debian.patch \
> >      file://CVE-2014-3618.patch \
> >      file://CVE-2017-16844.patch \
> > +    file://gcc14.patch \
> >  "
> >  SRC_URI[sha256sum] =
> > "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117"
> >
> > @@ -24,6 +25,7 @@ LIC_FILES_CHKSUM =
> > "file://COPYING;md5=a71e50e197a992c862379e576e669757 \
> >
> >  DEPENDS = "libnet"
> >  inherit autotools-brokensep
> > +
> >  do_configure() {
> >      find examples -type f | xargs chmod 644
> >      export CC="${BUILD_CC}"
> > @@ -35,7 +37,7 @@ do_configure() {
> >  }
> >
> >  do_compile() {
> > -    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}"
> > +    oe_runmake -i CFLAGS="$TARGET_CFLAGS -Wno-comments
> > -Wno-implicit-function-declaration -D_LARGEFILE_SOURCE
> > -D_FILE_OFFSET_BITS=64" LDFLAGS0="${LDFLAGS}"
> >  }
> >
> >  do_install() {
diff mbox series

Patch

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 @@ 
+From: Santiago Vila <sanvila@debian.org>
+Subject: Fix build with gcc-14
+Bug-Debian: https://bugs.debian.org/1075398
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/initmake
++++ b/initmake
+@@ -124,7 +124,7 @@ else
+ fi
+ 
+ cat >_autotst.c <<HERE
+-main()
++int main()
+ { return 0;
+ }
+ HERE
+@@ -200,7 +200,7 @@ cat >_autotst.c <<HERE
+ #include <sys/types.h>
+ #include <stdio.h>
+ #include <sys/stat.h>
+-main()
++int main()
+ { struct stat buf;return!&buf;
+ }
+ HERE
+--- a/src/autoconf
++++ b/src/autoconf
+@@ -414,6 +414,12 @@ cat >_autotst.c <<HERE
+ int dolock,child[NR_of_forks],timeout,fdcollect;
+ char dirlocktest[]="_locktest";
+ 
++#include <stdlib.h>
++int killchildren();
++int fdlock(int fd);
++int sfdlock(int fd);
++int fdunlock();
++
+ void stimeout()
+ { timeout=1;close(fdcollect);killchildren();
+ }
+@@ -435,7 +441,7 @@ unsigned sfork()
+   return pid;
+ }
+ 
+-int main(argc,argv)char*argv[];
++int main(int argc,char*argv[])
+ { int goodlock,testlock,i,pip[2],pipw[2];time_t otimet;unsigned dtimet;
+   static char filename[]="_locktst.l0";
+   close(0);goodlock=0;testlock=FIRST_lock;signal(SIGPIPE,SIG_DFL);
+@@ -585,13 +591,13 @@ int killchildren()
+   return 0;
+ }
+ 
+-int sfdlock(fd)
++int sfdlock(int fd)
+ { int i;unsigned gobble[GOBBLE>>2];
+   for(i=GOBBLE>>2;i;gobble[--i]=~(unsigned)0);		 /* SunOS crash test */
+   return fdlock(fd);
+ }
+ 
+-static oldfdlock;
++static int oldfdlock;
+ #ifdef F_SETLKW
+ static struct flock flck;		/* why can't it be a local variable? */
+ #endif
+@@ -599,7 +605,7 @@ static struct flock flck;		/* why can't
+ static off_t oldlockoffset;
+ #endif
+ 
+-int fdlock(fd)
++int fdlock(int fd)
+ { int i;unsigned gobble[GOBBLE>>2];
+   for(i=GOBBLE>>2;i;gobble[--i]=~(unsigned)0);		 /* SunOS crash test */
+   oldfdlock=fd;fd=0;
+@@ -993,11 +999,11 @@ int main(){int i;i=1;
+  i+=WIFEXITED(i);
+  i+=WIFSTOPPED(i);
+  i+=WEXITSTATUS(i);
+- i+=WSIGTERM(i);
++ i+=WTERMSIG(i);
+  return i;}
+ HERE
+ 
+-echo 'Testing for WIFEXITED(), WIFSTOPPED(), WEXITSTATUS() & WSIGTERM()'
++echo 'Testing for WIFEXITED(), WIFSTOPPED(), WEXITSTATUS() & WTERMSIG()'
+ if $MAKE _autotst.$O >_autotst.rrr 2>&1
+ then
+    $FGREP -v include/ <_autotst.rrr >_autotst.$O
+@@ -1029,6 +1035,8 @@ cat >_autotst.c <<HERE
+ #ifndef NO_COMSAT
+ #include "network.h"
+ #endif
++int setrgid();
++int setresgid();
+ int main(){char a[2];
+  endpwent();endgrent();memmove(a,"0",1);bcopy("0",a,1);strcspn(a,"0");
+  strtol("0",(char**)0,10);strchr("0",'0');strpbrk(a,"0");rename(a,"0");
+@@ -1059,7 +1067,7 @@ echo 'Testing for memmove, strchr, strpb
+ echo '	rename, setrgid, setegid, pow, opendir, mkdir, waitpid, fsync,'
+ echo '	ftruncate, strtod, strncasecmp, strerror, strlcat,'
+ echo '	memset, bzero, and _exit'
+-if $MAKE _autotst.$O >$DEVNULL 2>&1
++if $MAKE _autotst.$O >_autotst.rrr 2>&1
+ then
+ :
+ else
+@@ -1196,7 +1204,7 @@ unsigned long dobench(strstr,iter,haysta
+   return (unsigned long)clock()-to;
+ }
+ #endif
+-int main(argc,argv)int argc;const char*argv[];
++int main(int argc,const char*argv[])
+ { if(argc==1)
+    { char*haystack;
+ #ifdef BENCHSIZE
+--- a/src/mailfold.c
++++ b/src/mailfold.c
+@@ -378,7 +378,7 @@ void concon(ch)const int ch;   /* flip b
+    }
+ }
+ 
+-void readmail(rhead,tobesent)const long tobesent;
++void readmail(int rhead,const long tobesent)
+ { char*chp,*pastend;static size_t contlengthoffset;
+   ;{ long dfilled;
+      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 \
     file://man-file-mailstat.1-from-debian.patch \
     file://CVE-2014-3618.patch \
     file://CVE-2017-16844.patch \
+    file://gcc14.patch \
 "
 SRC_URI[sha256sum] = "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117"
 
@@ -24,6 +25,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=a71e50e197a992c862379e576e669757 \
 
 DEPENDS = "libnet"
 inherit autotools-brokensep
+
 do_configure() {
     find examples -type f | xargs chmod 644
     export CC="${BUILD_CC}"
@@ -35,7 +37,7 @@  do_configure() {
 }
 
 do_compile() {
-    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}"
+    oe_runmake -i CFLAGS="$TARGET_CFLAGS -Wno-comments -Wno-implicit-function-declaration -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS0="${LDFLAGS}"
 }
 
 do_install() {