Compiling ndoutils: error: expected specifier-qualifier-lis

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
bkfrvn
Posts: 10
Joined: Thu Jan 16, 2014 2:20 pm

Compiling ndoutils: error: expected specifier-qualifier-lis

Post by bkfrvn »

Hi all,

I experienced following error while compiling ndoutils 1.5.2
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H -c -o db.o db.c
In file included from db.c:17:
../include/ndo2db.h:58: error: expected specifier-qualifier-list before ‘MYSQL’
db.c: In function ‘ndo2db_db_init’:
db.c:128: error: ‘ndo2db_dbconninfo’ has no member named ‘instance_id’
db.c:129: error: ‘ndo2db_dbconninfo’ has no member named ‘conninfo_id’
db.c:130: error: ‘ndo2db_dbconninfo’ has no member named ‘latest_program_status_time’
Here is the use of MYSQL in ndo2db.h

Code: Select all

typedef struct ndo2db_dbconninfo_struct{
	int server_type;
	int connected;
	int error;
#ifdef USE_MYSQL
	MYSQL mysql_conn;
	MYSQL_RES *mysql_result;
	MYSQL_ROW mysql_row;
#endif
#ifdef USE_PGSQL
	PGconn *pgsql_conn;
	PGresult *pgsql_result;
#endif
	unsigned long instance_id;
	unsigned long conninfo_id;


However, I can not find the definition of MYSQL in ndoutils source code.

Could any one give me a suggestion?

Many thanks,
Giang.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Compiling ndoutils: error: expected specifier-qualifier

Post by tmcdonald »

What is the full command you are using to compile?
Former Nagios employee
bkfrvn
Posts: 10
Joined: Thu Jan 16, 2014 2:20 pm

Re: Compiling ndoutils: error: expected specifier-qualifier

Post by bkfrvn »

I just used:

Code: Select all

./configure
make
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Compiling ndoutils: error: expected specifier-qualifier

Post by tmcdonald »

I'm going to close this thread since the other thread you made references this one and they are essentially the same issue.
Former Nagios employee
Locked