[Buildroot] [git commit branch/2025.08.x] package/mjpg-streamer: fix build with gcc >= 14
Arnout Vandecappelle
arnout at rnout.be
Thu Oct 30 08:17:50 UTC 2025
commit: https://git.buildroot.net/buildroot/commit/?id=f2a0e39e682ea7d27d1884e26a815783973a8717
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2025.08.x
When mjpg-streamer is built with gcc >= 14 using libjpeg (rather than
jpeg-turbo), and with SDL is enabled (to enable the output_viewer),
the compilation can fail with error:
output_viewer.c:125:32: error: assignment to âboolean (*)(struct jpeg_decompress_struct *)â from incompatible pointer type âint (*)(struct jpeg_decompress_struct *)â [-Wincompatible-pointer-types]
The issue can be reproduced with the commands:
cat >.config <<EOF
BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_PACKAGE_LIBJPEG=y
BR2_PACKAGE_MJPG_STREAMER=y
BR2_PACKAGE_SDL=y
EOF
make olddefconfig
make mjpg-streamer
This commit adds a patch to fix this issue.
Fixes:
https://autobuild.buildroot.net/results/3a5/3a5674e4e7bb3f2894575191af24598e2a696912/
Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
[Julien: add commands to reproduce the issue]
Signed-off-by: Julien Olivain <ju.o at free.fr>
(cherry picked from commit af4eef1e0f7610573802273abbe8518a2f5b4a61)
Signed-off-by: Thomas Perale <thomas.perale at mind.be>
---
.../0003-output_viewer-fix-build-with-gcc-14.patch | 34 ++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/package/mjpg-streamer/0003-output_viewer-fix-build-with-gcc-14.patch b/package/mjpg-streamer/0003-output_viewer-fix-build-with-gcc-14.patch
new file mode 100644
index 0000000000..74c26ec3ea
--- /dev/null
+++ b/package/mjpg-streamer/0003-output_viewer-fix-build-with-gcc-14.patch
@@ -0,0 +1,34 @@
+From c0656c6a538739635441b165b4f1ba7c22c68b1d Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd at kuhls.net>
+Date: Sat, 18 Oct 2025 18:54:36 +0200
+Subject: [PATCH] output_viewer: fix build with gcc >= 14
+
+Fixes build error found by buildroot autobuilders:
+
+output_viewer.c:125:32: error: assignment to 'boolean (*)(struct jpeg_decompress_struct *)'
+from incompatible pointer type 'int (*)(struct jpeg_decompress_struct *)'
+[-Wincompatible-pointer-types]
+
+Upstream: https://github.com/jacksonliam/mjpg-streamer/pull/420
+
+Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
+---
+ .../plugins/output_viewer/output_viewer.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mjpg-streamer-experimental/plugins/output_viewer/output_viewer.c b/mjpg-streamer-experimental/plugins/output_viewer/output_viewer.c
+index dd6c55b..c50f701 100644
+--- a/mjpg-streamer-experimental/plugins/output_viewer/output_viewer.c
++++ b/mjpg-streamer-experimental/plugins/output_viewer/output_viewer.c
+@@ -86,7 +86,7 @@ static void init_source(j_decompress_ptr cinfo)
+ return;
+ }
+
+-static int fill_input_buffer(j_decompress_ptr cinfo)
++static boolean fill_input_buffer(j_decompress_ptr cinfo)
+ {
+ my_source_mgr * src = (my_source_mgr *) cinfo->src;
+
+--
+2.47.3
+
More information about the buildroot
mailing list