Skip to content

Commit

Permalink
tools/headerversions.c: fix build without SQLite
Browse files Browse the repository at this point in the history
Commit 5318459 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: 5318459
Changelog-None
  • Loading branch information
whitslack authored and rustyrussell committed Nov 18, 2024
1 parent 2e52df4 commit 67d667d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/headerversions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 67d667d

Please sign in to comment.