diff --git a/src/bin/pg_ctl/Makefile b/src/bin/pg_ctl/Makefile index b9b84aec3361af0d20b34d58e944c2cac1e1907c..21e4ffb1a5e6c89ba7bc32af5940a4c72b6248dc 100644 --- a/src/bin/pg_ctl/Makefile +++ b/src/bin/pg_ctl/Makefile @@ -25,6 +25,10 @@ LIBS := $(filter-out -lreadline -ledit -ltermcap -lncurses -lcurses -lcurl -lssl override CPPFLAGS := -DDEF_PGPORT=$(DEF_PGPORT) -I$(libpq_srcdir) $(CPPFLAGS) +ifeq ($(PORTNAME),openbsd) +override CFLAGS += -pthread +endif + OBJS= pg_ctl.o $(WIN32RES) all: pg_ctl diff --git a/src/bin/pg_dump/Makefile b/src/bin/pg_dump/Makefile index d2cf936cceb318aaa1ab79f829fc51e878e770f9..a11bf3e5d74f7156e7957450b0a0c40cca3bd0ba 100644 --- a/src/bin/pg_dump/Makefile +++ b/src/bin/pg_dump/Makefile @@ -25,6 +25,10 @@ LIBS := $(filter-out -lreadline -ledit -ltermcap -lncurses -lcurses -lcurl , $(L # the use of tempnam in pg_backup_tar.c causes a warning when using newer versions of GCC override CPPFLAGS := -Wno-deprecated-declarations -I$(libpq_srcdir) $(CPPFLAGS) +ifeq ($(PORTNAME),openbsd) +override CFLAGS += -pthread +endif + OBJS= pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o \ pg_backup_files.o pg_backup_null.o pg_backup_tar.o \ pg_backup_directory.o dumputils.o compress_io.o $(WIN32RES) diff --git a/src/bin/scripts/Makefile b/src/bin/scripts/Makefile index 726eb66c6d828bfa395708f0fa41a02fe96735d3..ec0877041413a383700ba76badde644159e0312c 100644 --- a/src/bin/scripts/Makefile +++ b/src/bin/scripts/Makefile @@ -26,8 +26,13 @@ PROGRAMS = createdb createlang createuser dropdb droplang dropuser clusterdb vac override CPPFLAGS := -I$(top_srcdir)/src/bin/pg_dump -I$(top_srcdir)/src/bin/psql -I$(libpq_srcdir) $(CPPFLAGS) + all: $(PROGRAMS) +ifeq ($(PORTNAME),openbsd) +override CFLAGS += -pthread +endif + %: %.o $(WIN32RES) $(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)