From 88c82224b08be8d53fb3d703b88ec127471fdfb8 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sat, 8 Oct 2022 10:43:13 +0200 Subject: [PATCH] [meson] build cookies/parsetst --- src/cookies/meson.build | 8 ++++++++ src/cookies/parsetst.c | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/src/cookies/meson.build b/src/cookies/meson.build index 1683e9b1..2f9cab1f 100644 --- a/src/cookies/meson.build +++ b/src/cookies/meson.build @@ -4,3 +4,11 @@ exe = executable('cookies-t', 'cookies-t.c', 'path.c', include_directories:['..' test_lib = environment({'TEST_LIB': meson.source_root()+'/test/libtest.sh'}) t = find_program('test-cookies-t') test('cookies', t, depends:[exe], env:test_lib, workdir:meson.current_build_dir()) + +parsetstdeps = files('parser.c', 'parsetst.c') + +if conf_data.get('CONFIG_DEBUG') + parsetsdeps += files(meson.source_root()+'/src/util/memdebug.c') +endif + +executable('parsetst', parsetstdeps, testdeps, c_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..']) diff --git a/src/cookies/parsetst.c b/src/cookies/parsetst.c index 2343b1f7..05b3fa46 100644 --- a/src/cookies/parsetst.c +++ b/src/cookies/parsetst.c @@ -10,6 +10,11 @@ #include "cookies/parser.h" +/* fake tty get function, needed for charsets.c */ +int get_ctl_handle() +{ + return -1; +} int main(int argc, char *argv[])