[PATCH] sqlite3.c:23531: error: 'fchmod' undeclared here (not in a function)

Started by possamai, January 28, 2014, 03:04:44 PM

Previous topic - Next topic

possamai

Trying to build NetXMS-1.2.11 on FreeBSD 9.2 I'm runing into an error message..
I configured like this: ./configure --with-openssl --with-mysql --with-server --with-snmp --with-agent --prefix=/usr/local/netxms

Then when I try to 'make' it ends in error.
I have sqlite3 installed.

Quote
Making all in sqlite
  CC     libnxsqlite_la-sqlite3.lo
sqlite3.c:23531: error: 'fchmod' undeclared here (not in a function)
*** [libnxsqlite_la-sqlite3.lo] Error code 1

I fixed it by adding #include <sys/stat.h> to netxms-1.2.11/src/sqlite/sqlite3.c
It's probably not the best place to put it but at least it works :)
Maybe it can be added to the next version so FreeBSD it can be compiled on FreeBSD without the need to google :P

Victor Kirhenshtein

Can you please check that latest SQLite amalgamation (http://www.sqlite.org/2013/sqlite-amalgamation-3080200.zip) compiles on FreeBSD 9.2? If yes, I'll just replace current version with latest one.

Best regards,
Victor

possamai

I could..... but I'm not really sure how..
"gcc sqlite3.c shell.c -o sqlite" compiles without error but I'm not sure if that's how I'm suposed to compile it.

Victor Kirhenshtein