Fix Android build without zstd

Bit of a blind fix, since I don't have an Android dev setup nearby.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
Emil Velikov 2024-09-19 14:13:00 +01:00
parent 0f7fd27524
commit f9da0667fb
2 changed files with 9 additions and 0 deletions

View File

@ -11,6 +11,7 @@ project('tqftpserv',
prefix = get_option('prefix')
zstd_dep = dependency('libzstd')
add_project_arguments('-DHAVE_ZSTD', language : 'c')
# Not required to build the executable, only to install unit file
systemd = dependency('systemd', required : false)

View File

@ -8,6 +8,14 @@
#include <stdbool.h>
#ifdef HAVE_ZSTD
int zstd_decompress_file(const char *filename);
#else
static int zstd_decompress_file(const char *filename)
{
fprintf(stderr, "Built without ZSTD support\n");
return -1;
}
#endif
#endif