Message ID | 20250328095823.3335387-1-martin.jansa@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [meta-oe] xl2tpd: fix build with gcc-15 | expand |
On Fri, Mar 28, 2025 at 2:58 AM Martin Jansa via lists.openembedded.org <martin.jansa=gmail.com@lists.openembedded.org> wrote: > > From: Martin Jansa <martin.jansa@gmail.com> > > Signed-off-by: Martin Jansa <martin.jansa@gmail.com> > --- > .../xl2tpd/0001-Fix-build-with-GCC-15.patch | 39 +++++++++++++++++++ > .../recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb | 4 +- > 2 files changed, 42 insertions(+), 1 deletion(-) > create mode 100644 meta-networking/recipes-protocols/xl2tpd/xl2tpd/0001-Fix-build-with-GCC-15.patch > > diff --git a/meta-networking/recipes-protocols/xl2tpd/xl2tpd/0001-Fix-build-with-GCC-15.patch b/meta-networking/recipes-protocols/xl2tpd/xl2tpd/0001-Fix-build-with-GCC-15.patch > new file mode 100644 > index 0000000000..2ba927bf0e > --- /dev/null > +++ b/meta-networking/recipes-protocols/xl2tpd/xl2tpd/0001-Fix-build-with-GCC-15.patch > @@ -0,0 +1,39 @@ > +From 754b0ca247b2d789f9f613f8757b9732494e9489 Mon Sep 17 00:00:00 2001 > +From: Yaakov Selkowitz <yselkowi@redhat.com> > +Date: Thu, 6 Mar 2025 21:03:28 -0500 > +Subject: [PATCH] Fix build with GCC 15 > + > +GCC 15 defaults to C23, in which the interpretation of function > +declarations without parameters changed from unspecified to `void`. This > +results in `control_handle_lac_status` not being compatible with the > +expected callback function type. Adding the expected type parameters, > +albeit unused, fixes the compatibility. > + > +Upstream-Status: Submitted [https://github.com/xelerance/xl2tpd/pull/272] Thanks for the fix. There is a similar patch proposed to this project last year see https://github.com/xelerance/xl2tpd/pull/269 > +Signed-off-by: Martin Jansa <martin.jansa@gmail.com> > +--- > + xl2tpd.c | 4 ++-- > + 1 file changed, 2 insertions(+), 2 deletions(-) > + > +diff --git a/xl2tpd.c b/xl2tpd.c > +index 3195988..0d148e9 100644 > +--- a/xl2tpd.c > ++++ b/xl2tpd.c > +@@ -74,7 +74,7 @@ static int control_handle_lac_hangup(FILE* resf, char* bufp); > + static int control_handle_lac_disconnect(FILE* resf, char* bufp); > + static int control_handle_lac_add_modify(FILE* resf, char* bufp); > + static int control_handle_lac_remove(FILE* resf, char* bufp); > +-static int control_handle_lac_status(); > ++static int control_handle_lac_status(FILE*, char*); > + static int control_handle_lns_remove(FILE* resf, char* bufp); > + > + static struct control_requests_handler control_handlers[] = { > +@@ -1541,7 +1541,7 @@ static int control_handle_lac_remove(FILE* resf, char* bufp){ > + return 1; > + } > + > +-static int control_handle_lac_status(){ > ++static int control_handle_lac_status(FILE*, char*){ > + show_status (); > + return 1; > + } > diff --git a/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb b/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb > index 08bab4a338..0b7887dacb 100644 > --- a/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb > +++ b/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb > @@ -8,7 +8,9 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" > LICENSE = "GPL-2.0-only" > LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" > > -SRC_URI = "git://github.com/xelerance/xl2tpd.git;branch=master;protocol=https" > +SRC_URI = "git://github.com/xelerance/xl2tpd.git;branch=master;protocol=https \ > + file://0001-Fix-build-with-GCC-15.patch \ > +" > SRCREV = "1ef2a025981223c1e16fc833bef226c86ff8c295" > > UPSTREAM_CHECK_URI = "https://github.com/xelerance/xl2tpd/releases" > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#116352): https://lists.openembedded.org/g/openembedded-devel/message/116352 > Mute This Topic: https://lists.openembedded.org/mt/111951455/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta-networking/recipes-protocols/xl2tpd/xl2tpd/0001-Fix-build-with-GCC-15.patch b/meta-networking/recipes-protocols/xl2tpd/xl2tpd/0001-Fix-build-with-GCC-15.patch new file mode 100644 index 0000000000..2ba927bf0e --- /dev/null +++ b/meta-networking/recipes-protocols/xl2tpd/xl2tpd/0001-Fix-build-with-GCC-15.patch @@ -0,0 +1,39 @@ +From 754b0ca247b2d789f9f613f8757b9732494e9489 Mon Sep 17 00:00:00 2001 +From: Yaakov Selkowitz <yselkowi@redhat.com> +Date: Thu, 6 Mar 2025 21:03:28 -0500 +Subject: [PATCH] Fix build with GCC 15 + +GCC 15 defaults to C23, in which the interpretation of function +declarations without parameters changed from unspecified to `void`. This +results in `control_handle_lac_status` not being compatible with the +expected callback function type. Adding the expected type parameters, +albeit unused, fixes the compatibility. + +Upstream-Status: Submitted [https://github.com/xelerance/xl2tpd/pull/272] +Signed-off-by: Martin Jansa <martin.jansa@gmail.com> +--- + xl2tpd.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/xl2tpd.c b/xl2tpd.c +index 3195988..0d148e9 100644 +--- a/xl2tpd.c ++++ b/xl2tpd.c +@@ -74,7 +74,7 @@ static int control_handle_lac_hangup(FILE* resf, char* bufp); + static int control_handle_lac_disconnect(FILE* resf, char* bufp); + static int control_handle_lac_add_modify(FILE* resf, char* bufp); + static int control_handle_lac_remove(FILE* resf, char* bufp); +-static int control_handle_lac_status(); ++static int control_handle_lac_status(FILE*, char*); + static int control_handle_lns_remove(FILE* resf, char* bufp); + + static struct control_requests_handler control_handlers[] = { +@@ -1541,7 +1541,7 @@ static int control_handle_lac_remove(FILE* resf, char* bufp){ + return 1; + } + +-static int control_handle_lac_status(){ ++static int control_handle_lac_status(FILE*, char*){ + show_status (); + return 1; + } diff --git a/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb b/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb index 08bab4a338..0b7887dacb 100644 --- a/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb +++ b/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.16.bb @@ -8,7 +8,9 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRC_URI = "git://github.com/xelerance/xl2tpd.git;branch=master;protocol=https" +SRC_URI = "git://github.com/xelerance/xl2tpd.git;branch=master;protocol=https \ + file://0001-Fix-build-with-GCC-15.patch \ +" SRCREV = "1ef2a025981223c1e16fc833bef226c86ff8c295" UPSTREAM_CHECK_URI = "https://github.com/xelerance/xl2tpd/releases"