tools/headerversions.c: fix build without SQLite

Commit 531845971c broke the build without
SQLite because this code:

	new = tal_fmt(NULL, template,
	              IF_SQLITE3(sqlite3_libversion_number()));

preprocesses into:

	new = tal_fmt(NULL, template,
	              );

which has a syntax error. Fix it by moving the comma into the macro
argument.

Fixes: 531845971c
Changelog-None
This commit is contained in:
Matt Whitlock 2024-09-18 14:08:31 -04:00 committed by Rusty Russell
parent 2e52df41dd
commit 67d667db90

View File

@ -49,8 +49,8 @@ int main(int argc, char *argv[])
if (!file && errno != ENOENT)
err(1, "Reading %s", argv[1]);
new = tal_fmt(NULL, template,
IF_SQLITE3(sqlite3_libversion_number()));
new = tal_fmt(NULL, template
IF_SQLITE3(, sqlite3_libversion_number()));
if (!file || !streq(new, file)) {
int fd = open(argv[1], O_TRUNC|O_WRONLY|O_CREAT, 0666);
if (fd < 0)