database: fix warning on Solaris