mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-01 13:40:04 +00:00
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>
This commit is contained in:
@@ -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 */
|
||||||
@@ -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://man-file-mailstat.1-from-debian.patch \
|
||||||
file://CVE-2014-3618.patch \
|
file://CVE-2014-3618.patch \
|
||||||
file://CVE-2017-16844.patch \
|
file://CVE-2017-16844.patch \
|
||||||
|
file://gcc14.patch \
|
||||||
"
|
"
|
||||||
SRC_URI[sha256sum] = "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117"
|
SRC_URI[sha256sum] = "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117"
|
||||||
|
|
||||||
@@ -24,6 +25,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a71e50e197a992c862379e576e669757 \
|
|||||||
|
|
||||||
DEPENDS = "libnet"
|
DEPENDS = "libnet"
|
||||||
inherit autotools-brokensep
|
inherit autotools-brokensep
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
find examples -type f | xargs chmod 644
|
find examples -type f | xargs chmod 644
|
||||||
export CC="${BUILD_CC}"
|
export CC="${BUILD_CC}"
|
||||||
@@ -35,7 +37,7 @@ do_configure() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
do_compile() {
|
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() {
|
do_install() {
|
||||||
|
|||||||
Reference in New Issue
Block a user