Merge branch 'ps/meson-clar-decls-fix'

Build fix.

* ps/meson-clar-decls-fix:
  meson: ensure correct "clar-decls.h" header is used
This commit is contained in:
Junio C Hamano
2025-08-04 08:10:34 -07:00
2 changed files with 9 additions and 1 deletions

View File

@@ -59,6 +59,9 @@ clar_sources += custom_target(
clar_unit_tests = executable('unit-tests',
sources: clar_sources + clar_test_suites,
c_args: [
'-DGIT_CLAR_DECLS_H="' + clar_decls_h.full_path() + '"',
],
dependencies: [libgit_commonmain],
)
test('unit-tests', clar_unit_tests, kwargs: test_kwargs)

View File

@@ -1,8 +1,13 @@
#include "git-compat-util.h"
#include "clar/clar.h"
#include "clar-decls.h"
#include "strbuf.h"
#ifndef GIT_CLAR_DECLS_H
# include "clar-decls.h"
#else
# include GIT_CLAR_DECLS_H
#endif
#define cl_failf(fmt, ...) do { \
char desc[4096]; \
snprintf(desc, sizeof(desc), fmt, __VA_ARGS__); \