// Create a database
struct loc_writer* writer;
- err = loc_writer_new(ctx, &writer);
+ err = loc_writer_new(ctx, &writer, NULL);
if (err < 0)
exit(EXIT_FAILURE);
loc_as_unref(as);
}
- FILE* f = fopen("test.db", "w");
+ FILE* f = fopen("test.db", "w+");
if (!f) {
fprintf(stderr, "Could not open file for writing: %s\n", strerror(errno));
exit(EXIT_FAILURE);