From 0b31718946ae1c4f9ab7e594ea7442576762c728 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Wed, 3 Jun 2026 15:22:10 +0300
Subject: [PATCH 2/4] Fix mjpegtools build on ppc g5 and gcc 15.2.0

---
 cinelerra-5.1/thirdparty/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile
index 9755c188..e20d8615 100644
--- a/cinelerra-5.1/thirdparty/Makefile
+++ b/cinelerra-5.1/thirdparty/Makefile
@@ -190,7 +190,7 @@ ffmpeg.cfg_params= \
 		$(call ld_path,x264) \
 		$(call ld_path,x265) \
 		$(shared_libs) \
-		-Wl,--end-group -lm -lstdc++ -pthread \
+		-Wl,--end-group -lm -lstdc++ -pthread -latomic \
 		$(EXTRA_LIBS)" $(FFMPEG_EXTRA_CFG) \
 
 #cmake_config=echo "exec cmake \$$$$@ $(1)" > ./configure; chmod +x ./configure;
@@ -229,7 +229,7 @@ libwebp.cfg_vars?= ./autogen.sh;
 libwebp.cfg_params?= --prefix=$(call bld_path,libwebp)usr/local --enable-static --disable-shared --disable-libwebpdemux --disable-libwebpmux; \
     make install;
 mjpegtools.cflags?="$(call inc_path,libjpeg) $(call ld_path,libjpeg,build)"
-mjpegtools.cfg_vars?= ./autogen.sh; export CXXFLAGS+=" -std=c++11 "; export CFLAGS+=" -std=gnu11 ";
+mjpegtools.cfg_vars?= ./autogen.sh; export CXXFLAGS+=" -std=c++11 "; export CFLAGS+=" -Wno-incompatible-pointer-types -std=gnu11 ";
 mjpegtools.cfg_params?= --enable-shared=no --without-libquicktime --without-libdv \
  --without-libpng --without-dga --without-gtk --without-libsdl --without-sdlgfx
 mjpegtools.mak_params?= all
-- 
2.51.2

