* [Buildroot] [PATCH 2/5] package/mjpegtools: fix build with gcc-15.x
2025-05-18 17:46 [Buildroot] [PATCH 1/5] package/iftop: fix build with gcc-15.x Bernd Kuhls
@ 2025-05-18 17:46 ` Bernd Kuhls
2025-05-18 17:46 ` [Buildroot] [PATCH 3/5] package/mrouted: " Bernd Kuhls
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Bernd Kuhls @ 2025-05-18 17:46 UTC (permalink / raw)
To: buildroot; +Cc: Bogdan Radulescu, Joachim Wiberg, Steve Kenton, Wade Berrier
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
package/mjpegtools/0001-gcc15.patch | 354 ++++++++++++++++++++++++++++
1 file changed, 354 insertions(+)
create mode 100644 package/mjpegtools/0001-gcc15.patch
diff --git a/package/mjpegtools/0001-gcc15.patch b/package/mjpegtools/0001-gcc15.patch
new file mode 100644
index 0000000000..019317c7fd
--- /dev/null
+++ b/package/mjpegtools/0001-gcc15.patch
@@ -0,0 +1,354 @@
+Fix build with gcc-15.x
+
+Upstream: https://sourceforge.net/p/mjpeg/Code/3513/
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+
+Index: trunk/mjpeg_play/y4mdenoise/Region2D.hh
+===================================================================
+--- mjpeg_play/y4mdenoise/Region2D.hh (Revision 3512)
++++ mjpeg_play/y4mdenoise/Region2D.hh (Revision 3513)
+@@ -97,35 +97,11 @@
+ // Add the given horizontal extent to the region. Note that
+ // a_tnXEnd is technically one past the end of the extent.
+
+- template <class REGION, class REGION_TEMP>
+- void UnionDebug (Status_t &a_reStatus, INDEX a_tnY,
+- INDEX a_tnXStart, INDEX a_tnXEnd, REGION_TEMP &a_rTemp);
+- // Add the given horizontal extent to the region. Note that
+- // a_tnXEnd is technically one past the end of the extent.
+- // Exhaustively (i.e. slowly) verifies the results, using a
+- // much simpler algorithm.
+- // Requires the use of a temporary region, usually of the
+- // final subclass' type, in order to work. (Since that can't
+- // be known at this level, a template parameter is included for
+- // it.)
+-
+ template <class REGION>
+ void Union (Status_t &a_reStatus, const REGION &a_rOther);
+ // Make the current region represent the union between itself
+ // and the other given region.
+
+- template <class REGION, class REGION_O, class REGION_TEMP>
+- void UnionDebug (Status_t &a_reStatus,
+- REGION_O &a_rOther, REGION_TEMP &a_rTemp);
+- // Make the current region represent the union between itself
+- // and the other given region.
+- // Exhaustively (i.e. slowly) verifies the results, using a
+- // much simpler algorithm.
+- // Requires the use of a temporary region, usually of the
+- // final subclass' type, in order to work. (Since that can't
+- // be known at this level, a template parameter is included for
+- // it.)
+-
+ //void Merge (Status_t &a_reStatus, INDEX a_tnY, INDEX a_tnXStart,
+ // INDEX a_tnXEnd);
+ // Merge this extent into the current region.
+@@ -166,36 +142,11 @@
+ // Subtract the given horizontal extent from the region. Note
+ // that a_tnXEnd is technically one past the end of the extent.
+
+- template <class REGION_TEMP>
+- void SubtractDebug (Status_t &a_reStatus, INDEX a_tnY,
+- INDEX a_tnXStart, INDEX a_tnXEnd, REGION_TEMP &a_rTemp);
+- // Subtract the given horizontal extent from the region. Note
+- // that a_tnXEnd is technically one past the end of the extent.
+- // Exhaustively (i.e. slowly) verifies the results, using a
+- // much simpler algorithm.
+- // Requires the use of a temporary region, usually of the
+- // final subclass' type, in order to work. (Since that can't
+- // be known at this level, a template parameter is included for
+- // it.)
+-
+ template <class REGION>
+ void Subtract (Status_t &a_reStatus, const REGION &a_rOther);
+ // Subtract the other region from the current region, i.e.
+ // remove from the current region any extents that exist in the
+ // other region.
+-
+- template <class REGION, class REGION_O, class REGION_TEMP>
+- void SubtractDebug (Status_t &a_reStatus, REGION_O &a_rOther,
+- REGION_TEMP &a_rTemp);
+- // Subtract the other region from the current region, i.e.
+- // remove from the current region any extents that exist in the
+- // other region.
+- // Exhaustively (i.e. slowly) verifies the results, using a
+- // much simpler algorithm.
+- // Requires the use of a temporary region, usually of the
+- // final subclass' type, in order to work. (Since that can't
+- // be known at this level, a template parameter is included for
+- // it.)
+
+ //typedef ... ConstIterator;
+ //ConstIterator Begin (void) const { return m_setExtents.Begin(); }
+@@ -404,85 +355,6 @@
+
+
+
+-// Add the given horizontal extent to the region.
+-template <class INDEX, class SIZE>
+-template <class REGION, class REGION_TEMP>
+-void
+-Region2D<INDEX,SIZE>::UnionDebug (Status_t &a_reStatus, INDEX a_tnY,
+- INDEX a_tnXStart, INDEX a_tnXEnd, REGION_TEMP &a_rTemp)
+-{
+- typename REGION::ConstIterator itHere;
+- typename REGION_TEMP::ConstIterator itHereO;
+- INDEX tnX;
+- // Used to loop through points.
+-
+- // Make sure they didn't start us off with an error.
+- assert (a_reStatus == g_kNoError);
+-
+- // Calculate the union.
+- a_rTemp.Assign (a_reStatus, *this);
+- if (a_reStatus != g_kNoError)
+- return;
+- a_rTemp.Union (a_reStatus, a_tnY, a_tnXStart, a_tnXEnd);
+- if (a_reStatus != g_kNoError)
+- return;
+-
+- // Loop through every point in the result, make sure it's in
+- // one of the two input regions.
+- for (itHereO = a_rTemp.Begin(); itHereO != a_rTemp.End(); ++itHereO)
+- {
+- const Extent &rHere = *itHereO;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (!((rHere.m_tnY == a_tnY
+- && (tnX >= a_tnXStart && tnX < a_tnXEnd))
+- || this->DoesContainPoint (rHere.m_tnY, tnX)))
+- goto error;
+- }
+- }
+-
+- // Loop through every point in the original region, make sure
+- // it's in the result.
+- for (itHere = this->Begin(); itHere != this->End(); ++itHere)
+- {
+- const Extent &rHere = *itHere;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (!a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
+- goto error;
+- }
+- }
+-
+- // Loop through every point in the added extent, make sure it's in
+- // the result.
+- for (tnX = a_tnXStart; tnX < a_tnXEnd; ++tnX)
+- {
+- if (!a_rTemp.DoesContainPoint (a_tnY, tnX))
+- goto error;
+- }
+-
+- // The operation succeeded. Commit it.
+- Assign (a_reStatus, a_rTemp);
+- if (a_reStatus != g_kNoError)
+- return;
+-
+- // All done.
+- return;
+-
+-error:
+- // Handle deviations.
+- fprintf (stderr, "Region2D::Union() failed\n");
+- fprintf (stderr, "Input region:\n");
+- PrintRegion (*this);
+- fprintf (stderr, "Input extent: [%d,%d-%d]\n",
+- int (a_tnY), int (a_tnXStart), int (a_tnXEnd));
+- fprintf (stderr, "Result:\n");
+- PrintRegion (a_rTemp);
+- assert (false);
+-}
+-
+-
+-
+ // Make the current region represent the union between itself
+ // and the other given region.
+ template <class INDEX, class SIZE>
+@@ -511,184 +383,6 @@
+ }
+ }
+
+-
+-
+-// Make the current region represent the union between itself
+-// and the other given region.
+-template <class INDEX, class SIZE>
+-template <class REGION, class REGION_O, class REGION_TEMP>
+-void
+-Region2D<INDEX,SIZE>::UnionDebug (Status_t &a_reStatus,
+- REGION_O &a_rOther, REGION_TEMP &a_rTemp)
+-{
+- typename REGION::ConstIterator itHere;
+- typename REGION_O::ConstIterator itHereO;
+- typename REGION_TEMP::ConstIterator itHereT;
+- INDEX tnX;
+- // Used to loop through points.
+-
+- // Make sure they didn't start us off with an error.
+- assert (a_reStatus == g_kNoError);
+-
+- // Calculate the union.
+- a_rTemp.Assign (a_reStatus, *this);
+- if (a_reStatus != g_kNoError)
+- return;
+- a_rTemp.Union (a_reStatus, a_rOther);
+- if (a_reStatus != g_kNoError)
+- return;
+-
+- // Loop through every point in the result, make sure it's in
+- // one of the two input regions.
+- for (itHereT = a_rTemp.Begin(); itHereT != a_rTemp.End(); ++itHereT)
+- {
+- const Extent &rHere = *itHereT;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (!a_rOther.DoesContainPoint (rHere.m_tnY, tnX)
+- && !this->DoesContainPoint (rHere.m_tnY, tnX))
+- goto error;
+- }
+- }
+-
+- // Loop through every point in the first input region, make sure
+- // it's in the result.
+- for (itHere = this->Begin(); itHere != this->End(); ++itHere)
+- {
+- const Extent &rHere = *itHere;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (!a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
+- goto error;
+- }
+- }
+-
+- // Loop through every point in the second input region, make sure
+- // it's in the result.
+- for (itHereO = a_rOther.Begin();
+- itHereO != a_rOther.End();
+- ++itHereO)
+- {
+- const Extent &rHere = *itHereO;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (!a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
+- goto error;
+- }
+- }
+-
+- // The operation succeeded. Commit it.
+- Assign (a_reStatus, a_rTemp);
+- if (a_reStatus != g_kNoError)
+- return;
+-
+- // All done.
+- return;
+-
+-error:
+- // Handle deviations.
+- fprintf (stderr, "Region2D::Union() failed\n");
+- fprintf (stderr, "First input region:\n");
+- PrintRegion (*this);
+- fprintf (stderr, "Second input region:\n");
+- PrintRegion (a_rOther);
+- fprintf (stderr, "Result:\n");
+- PrintRegion (a_rTemp);
+- assert (false);
+-}
+-
+-
+-
+-// Subtract the other region from the current region, i.e.
+-// remove from the current region any areas that exist in the
+-// other region.
+-template <class INDEX, class SIZE>
+-template <class REGION, class REGION_O, class REGION_TEMP>
+-void
+-Region2D<INDEX,SIZE>::SubtractDebug (Status_t &a_reStatus,
+- REGION_O &a_rOther, REGION_TEMP &a_rTemp)
+-{
+- typename REGION::ConstIterator itHere;
+- typename REGION_O::ConstIterator itHereO;
+- typename REGION_TEMP::ConstIterator itHereT;
+- INDEX tnX;
+- // Used to loop through points.
+-
+- // Make sure they didn't start us off with an error.
+- assert (a_reStatus == g_kNoError);
+-
+- // Calculate the difference.
+- a_rTemp.Assign (a_reStatus, *this);
+- if (a_reStatus != g_kNoError)
+- return;
+- a_rTemp.Subtract (a_reStatus, a_rOther);
+- if (a_reStatus != g_kNoError)
+- return;
+-
+- // Loop through every point in the result, make sure it's in
+- // the first input region but not the second.
+- for (itHereT = a_rTemp.Begin(); itHereT != a_rTemp.End(); ++itHereT)
+- {
+- const Extent &rHere = *itHereT;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (!(this->DoesContainPoint (rHere.m_tnY, tnX)
+- && !a_rOther.DoesContainPoint (rHere.m_tnY, tnX)))
+- goto error;
+- }
+- }
+-
+- // Loop through every point in the first input region, and if it's
+- // not in the second input region, make sure it's in the result.
+- for (itHere = this->Begin(); itHere != this->End(); ++itHere)
+- {
+- const Extent &rHere = *itHere;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (!a_rOther.DoesContainPoint (rHere.m_tnY, tnX))
+- {
+- if (!a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
+- goto error;
+- }
+- }
+- }
+-
+- // Loop through every point in the second input region, make sure
+- // it's not in the result.
+- for (itHereO = a_rOther.Begin();
+- itHereO != a_rOther.End();
+- ++itHereO)
+- {
+- const Extent &rHere = *itHere;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
+- goto error;
+- }
+- }
+-
+- // The operation succeeded. Commit it.
+- Assign (a_reStatus, a_rTemp);
+- if (a_reStatus != g_kNoError)
+- return;
+-
+- // All done.
+- return;
+-
+-error:
+- // Handle deviations.
+- fprintf (stderr, "Region2D::Subtract() failed\n");
+- fprintf (stderr, "First input region:\n");
+- PrintRegion (*this);
+- fprintf (stderr, "Second input region:\n");
+- PrintRegion (a_rOther);
+- fprintf (stderr, "Result:\n");
+- PrintRegion (a_rTemp);
+- assert (false);
+-}
+-
+-
+-
+ // Flood-fill the current region.
+ template <class INDEX, class SIZE>
+ template <class CONTROL>
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH 5/5] package/pppd: fix build with gcc-15.x
2025-05-18 17:46 [Buildroot] [PATCH 1/5] package/iftop: fix build with gcc-15.x Bernd Kuhls
` (2 preceding siblings ...)
2025-05-18 17:46 ` [Buildroot] [PATCH 4/5] package/ngrep: " Bernd Kuhls
@ 2025-05-18 17:46 ` Bernd Kuhls
2025-05-19 16:43 ` [Buildroot] [PATCH 1/5] package/iftop: " Julien Olivain
4 siblings, 0 replies; 7+ messages in thread
From: Bernd Kuhls @ 2025-05-18 17:46 UTC (permalink / raw)
To: buildroot; +Cc: Bogdan Radulescu, Joachim Wiberg, Steve Kenton, Wade Berrier
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
...d-Fix-building-session.c-with-GCC-15.patch | 36 +++++++++
...3-pppdump-Fixed-building-with-GCC-15.patch | 76 +++++++++++++++++++
2 files changed, 112 insertions(+)
create mode 100644 package/pppd/0002-pppd-Fix-building-session.c-with-GCC-15.patch
create mode 100644 package/pppd/0003-pppdump-Fixed-building-with-GCC-15.patch
diff --git a/package/pppd/0002-pppd-Fix-building-session.c-with-GCC-15.patch b/package/pppd/0002-pppd-Fix-building-session.c-with-GCC-15.patch
new file mode 100644
index 0000000000..4fcd492562
--- /dev/null
+++ b/package/pppd/0002-pppd-Fix-building-session.c-with-GCC-15.patch
@@ -0,0 +1,36 @@
+From fb769c380eeacf23b64cb3bf7860ba49a0e0eed5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 8 Apr 2025 00:15:57 -0700
+Subject: [PATCH] pppd: Fix building session.c with GCC 15 (#553)
+
+Fixed building with GCC 15 which defaults to C23
+and find conflicting declration of getspnam() here
+with the one provided by shadow.h (extern struct spwd *getspnam (const char *__name);)
+
+Fixes
+../../ppp-2.5.2/pppd/session.c: In function 'session_start':
+../../ppp-2.5.2/pppd/session.c:185:18: error: conflicting types for 'getspnam'; have 'struct spwd *(void)'
+ 185 | struct spwd *getspnam();
+ | ^~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream: https://github.com/ppp-project/ppp/commit/fb769c380eeacf23b64cb3bf7860ba49a0e0eed5
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ pppd/session.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/pppd/session.c b/pppd/session.c
+index f08d8e19..9cc75389 100644
+--- a/pppd/session.c
++++ b/pppd/session.c
+@@ -182,7 +182,6 @@ session_start(const int flags, const char *user, const char *passwd, const char
+ char *cbuf;
+ #ifdef HAVE_SHADOW_H
+ struct spwd *spwd;
+- struct spwd *getspnam();
+ long now = 0;
+ #endif /* #ifdef HAVE_SHADOW_H */
+ #endif /* #ifdef PPP_WITH_PAM */
diff --git a/package/pppd/0003-pppdump-Fixed-building-with-GCC-15.patch b/package/pppd/0003-pppdump-Fixed-building-with-GCC-15.patch
new file mode 100644
index 0000000000..ab7c94e506
--- /dev/null
+++ b/package/pppd/0003-pppdump-Fixed-building-with-GCC-15.patch
@@ -0,0 +1,76 @@
+From 05361692ee7d6260ce5c04c9fa0e5a1aa7565323 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
+Date: Thu, 27 Feb 2025 23:00:16 +0100
+Subject: [PATCH] pppdump: Fixed building with GCC 15 (#548)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GCC 15 defaults to C23 which does not allow K&R declarations.
+
+Credit Yaakov Selkowitz in:
+https://src.fedoraproject.org/rpms/ppp/pull-request/12
+
+Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
+
+Upstream: https://github.com/ppp-project/ppp/commit/05361692ee7d6260ce5c04c9fa0e5a1aa7565323
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ pppdump/pppdump.c | 20 +++++++-------------
+ 1 file changed, 7 insertions(+), 13 deletions(-)
+
+diff --git a/pppdump/pppdump.c b/pppdump/pppdump.c
+index c24208af..1534036c 100644
+--- a/pppdump/pppdump.c
++++ b/pppdump/pppdump.c
+@@ -42,14 +42,12 @@ int tot_sent, tot_rcvd;
+ extern int optind;
+ extern char *optarg;
+
+-void dumplog();
+-void dumpppp();
+-void show_time();
++void dumplog(FILE *);
++void dumpppp(FILE *);
++void show_time(FILE *, int);
+
+ int
+-main(ac, av)
+- int ac;
+- char **av;
++main(int ac, char **av)
+ {
+ int i;
+ char *p;
+@@ -97,8 +95,7 @@ main(ac, av)
+ }
+
+ void
+-dumplog(f)
+- FILE *f;
++dumplog(FILE *f)
+ {
+ int c, n, k, col;
+ int nb, c2;
+@@ -241,8 +238,7 @@ struct pkt {
+ unsigned char dbuf[8192];
+
+ void
+-dumpppp(f)
+- FILE *f;
++dumpppp(FILE *f)
+ {
+ int c, n, k;
+ int nb, nl, dn, proto, rv;
+@@ -375,9 +371,7 @@ dumpppp(f)
+ }
+
+ void
+-show_time(f, c)
+- FILE *f;
+- int c;
++show_time(FILE *f, int c)
+ {
+ time_t t;
+ int n;
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread