diff --git a/extra/libheif/PKGBUILD b/extra/libheif/PKGBUILD
index c229446b8..535e2fd6f 100644
--- a/extra/libheif/PKGBUILD
+++ b/extra/libheif/PKGBUILD
@@ -35,6 +35,7 @@ source=(git+https://github.com/strukturag/libheif#tag=v$pkgver)
 sha256sums=('edd45429bf2ce428cfe8082f8879d27633b77435c3cd073c7a23e2525121368d')
 
 build() {
+  CXXFLAGS+=" -Wno-error=stringop-overflow"
   cmake -B build -S $pkgname \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DWITH_DAV1D=ON \