Properly use pg_config --includedirs + move modules to contrib

This commit is contained in:
Joris Vink 2014-03-31 11:29:51 +02:00
parent f7190c8b12
commit 22882261f7
17 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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

View File

Before

Width:  |  Height:  |  Size: 818 KiB

After

Width:  |  Height:  |  Size: 818 KiB

View File

@ -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));