diff --git a/testing/htmlcxx/APKBUILD b/testing/htmlcxx/APKBUILD
index e9be5415068653433d8c8f7c2b4360277102d20a..77b8f5278f9e25de1f80933484468d36e6a5fb4f 100644
--- a/testing/htmlcxx/APKBUILD
+++ b/testing/htmlcxx/APKBUILD
@@ -12,7 +12,12 @@ subpackages="$pkgname-dev"
 source="$pkgname-$pkgver.tar.gz::https://sourceforge.net/projects/htmlcxx/files/v$pkgver/htmlcxx-$pkgver.tar.gz"
 
 build() {
-	./configure --prefix=/usr --build=$CBUILD --host=$CHOST
+	# gcc12 defaults to 17 which fails due to throw()
+	export CXXFLAGS="$CXXFLAGS -std=c++14"
+	./configure \
+		--prefix=/usr \
+		--build=$CBUILD \
+		--host=$CHOST
 	make
 }