Re: Error at compiling ifmail

Yar Tikhiy (yar@comp.chem.msu.su)
Sat, 19 Jul 1997 14:37:56 +0400 (MSD)

Hi!

> In file included from nlindex.h:9,
> from nodelist.c:21:
> /usr/include/ndbm.h:38: conflicting types for `datum'
> /usr/include/ndbm.h:38: previous declaration of `datum'
> /usr/include/ndbm.h:42: conflicting types for `DBM'
> /usr/include/ndbm.h:42: previous declaration of `DBM'
> /usr/include/ndbm.h:47: conflicting types for `dbm_open'
> /usr/include/ndbm.h:47: previous declaration of `dbm_open'
> /usr/include/ndbm.h:51: conflicting types for `dbm_fetch'
> /usr/include/ndbm.h:51: previous declaration of `dbm_fetch'
> /usr/include/ndbm.h:59: conflicting types for `dbm_firstkey'
> /usr/include/ndbm.h:59: previous declaration of `dbm_firstkey'
> /usr/include/ndbm.h:61: conflicting types for `dbm_nextkey'
> /usr/include/ndbm.h:61: previous declaration of `dbm_nextkey'
> make[1]: *** [nodelist.o] Error 1
> make[1]: Leaving directory `/xtch/ifmail-2.8g/ifcico'
> make: *** [all] Error 2
>
> Any help would be deeply appreciated. Due to the sheer complexity of the
> package, I don't know where to start to resolve this. Is there a simple fix?

Yes. The problem is that 'ndbm.h' header file shipped with gdbm library
has no standard #defines and #ifdefs that are used to avoid duplicate
including.

So, you must add something like
#ifndef _NDBM_H_
#define _NDBM_H_
to the beginning of your /usr/include/ndbm.h and
#endif
to its end.

SY, Yar