forked from mirrors/kore
Properly use pg_config --includedirs + move modules to contrib
This commit is contained in:
parent
f7190c8b12
commit
22882261f7
2
Makefile
2
Makefile
|
@ -21,7 +21,7 @@ endif
|
|||
ifneq ("$(PGSQL)", "")
|
||||
S_SRC+=contrib/postgres/kore_pgsql.c
|
||||
LDFLAGS+=-lpq
|
||||
CFLAGS+=-DKORE_USE_PGSQL
|
||||
CFLAGS+=-I$(shell pg_config --includedir) -DKORE_USE_PGSQL
|
||||
endif
|
||||
|
||||
OSNAME=$(shell uname -s | sed -e 's/[-_].*//g' | tr A-Z a-z)
|
||||
|
|
|
@ -17,7 +17,7 @@ MEDIA_DIR=media
|
|||
SOURCE_DIR=src
|
||||
|
||||
# The directory containing the Kore source code.
|
||||
KORE_DIR=../../
|
||||
KORE_DIR=../../../
|
||||
|
||||
# Compiler settings.
|
||||
CC=gcc
|
Before Width: | Height: | Size: 818 KiB After Width: | Height: | Size: 818 KiB |
|
@ -233,7 +233,7 @@ pgsql_conn_create(struct http_request *req, int idx)
|
|||
kore_debug("pgsql_conn_create(): %p", conn);
|
||||
memset(conn, 0, sizeof(*conn));
|
||||
|
||||
conn->db = PQconnectdb("host=/tmp/ user=joris");
|
||||
conn->db = PQconnectdb("host=/var/run/postgresql/ user=joris");
|
||||
if (conn->db == NULL || (PQstatus(conn->db) != CONNECTION_OK)) {
|
||||
req->pgsql[idx]->state = KORE_PGSQL_STATE_ERROR;
|
||||
req->pgsql[idx]->error = kore_strdup(PQerrorMessage(conn->db));
|
||||
|
|
Loading…
Reference in New Issue