postgresqlPackages.pg_net: remove general -Wno-error
I wondered if this is strictly needed and it turns out that except from
the postgresql_18 version failing with
pg_net> src/worker.c:20:14: error: no previous extern declaration for non-static variable 'worker_state' [-Werror,-Wmissing-variable-declarations]
pg_net> 20 | WorkerState *worker_state = NULL;
pg_net> | ^
pg_net> src/worker.c:20:1: note: declare 'static' if the variable is not intended to be used outside of this translation unit
pg_net> 20 | WorkerState *worker_state = NULL;
pg_net> | ^
pg_net> 1 error generated.
pg_net> make: *** [<builtin>: src/worker.o] Error 1
the package builds without it.
This commit is contained in:
@@ -19,7 +19,9 @@ postgresqlBuildExtension (finalAttrs: {
|
||||
|
||||
buildInputs = [ curl ];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||
env.NIX_CFLAGS_COMPILE = toString (
|
||||
lib.optional (lib.versionAtLeast postgresql.version "18") "-Wno-error=missing-variable-declarations"
|
||||
);
|
||||
|
||||
meta = {
|
||||
description = "Async networking for Postgres";
|
||||
|
||||
Reference in New Issue
Block a user