summaryrefslogtreecommitdiffstats
path: root/src/zabbix_server/timer
diff options
context:
space:
mode:
Diffstat (limited to 'src/zabbix_server/timer')
-rw-r--r--src/zabbix_server/timer/Makefile.am2
-rw-r--r--src/zabbix_server/timer/timer.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/zabbix_server/timer/Makefile.am b/src/zabbix_server/timer/Makefile.am
index 1a9efcc2..338d5e3a 100644
--- a/src/zabbix_server/timer/Makefile.am
+++ b/src/zabbix_server/timer/Makefile.am
@@ -1,4 +1,4 @@
SUBDIRS=
-INCLUDES=-I@top_srcdir@/include @MYSQL_INCLUDE@ @ORACLE_INCLUDE@ @PGSQL_INCLUDE@
+INCLUDES=-I@top_srcdir@/include @MYSQL_CFLAGS@ @ORACLE_INCLUDE@ @POSTGRESQL_CFLAGS@
lib_LIBRARIES=libzbxtimer.a
libzbxtimer_a_SOURCES=timer.c
diff --git a/src/zabbix_server/timer/timer.c b/src/zabbix_server/timer/timer.c
index 6a08fbb6..a5ff96db 100644
--- a/src/zabbix_server/timer/timer.c
+++ b/src/zabbix_server/timer/timer.c
@@ -83,7 +83,7 @@ void main_timer_loop()
now=time(NULL);
/*
-#ifdef HAVE_PGSQL
+#ifdef HAVE_POSTGRESQL
zbx_snprintf(sql,sizeof(sql),"select distinct f.itemid,f.functionid,f.parameter from functions f, items i,hosts h where h.hostid=i.hostid and h.status=%d and i.itemid=f.itemid and f.function in ('nodata','date','dayofweek','time','now') and i.lastclock+f.parameter::text::integer<=%d and i.status=%d", HOST_STATUS_MONITORED, now, ITEM_STATUS_ACTIVE);
#else
zbx_snprintf(sql,sizeof(sql),"select distinct f.itemid,f.functionid,f.parameter,f.function from functions f, items i,hosts h where h.hostid=i.hostid and h.status=%d and i.itemid=f.itemid and f.function in ('nodata','date','dayofweek','time','now') and i.lastclock+f.parameter<=%d and i.status=%d", HOST_STATUS_MONITORED, now, ITEM_STATUS_ACTIVE);