From a1e1ed9e24f779b7511dcc8aa6dbafaac1ba2fee Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 5 Aug 2025 13:04:57 +0200 Subject: [PATCH] define static_assert if not done. fixes https://github.com/gphoto/libgphoto2/issues/1145 --- libgphoto2_port/libgphoto2_port/compiletime-assert.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libgphoto2_port/libgphoto2_port/compiletime-assert.h b/libgphoto2_port/libgphoto2_port/compiletime-assert.h index 4c046e76e..146061434 100644 --- a/libgphoto2_port/libgphoto2_port/compiletime-assert.h +++ b/libgphoto2_port/libgphoto2_port/compiletime-assert.h @@ -35,6 +35,11 @@ #include +/* needed for older Macs https://github.com/gphoto/libgphoto2/issues/1145 */ +#ifndef static_assert +#define static_assert _Static_assert +#endif + /** Compiletime assertion for use inside a function. */ #define COMPILETIME_ASSERT(CONDITION) \ static_assert((CONDITION), #CONDITION)