[hatari-devel] Unable to compile hatari on Solaris 11

Eero Tamminen oak at helsinkinet.fi
Thu Apr 7 19:20:45 CEST 2011


Hi,

On torstai 07 huhtikuu 2011, Christer Solskogen wrote:
> This is the preliminary error. Is this a problem with the hatari or
> the compiler?
> 
> gcc-3.4.3
> 
...
> /usr/include/dirent.h:110: error: previous declaration of 'scandir' was
> here /home/et0640/source/hatari/src/includes/scandir.h:20: error:
> conflicting types for 'scandir'

if you look into src/includes/scandir.h, you'll see:
---
#if defined(__BEOS__) || (defined(__sun) && defined(__SVR4)) || 
defined(WIN32) || defined(__CEGCC__)
extern int alphasort(const void *d1, const void *d2);
extern int scandir(const char *dirname, struct dirent ***namelist, int 
(*sdfilter)(struct dirent *), int (*dcomp)(const void *, const void *));
#endif
---

Those platforms have at least earlier lacked these definitions.

Which of the above defines your toolchain declares?

And is there some version define that could be used to check whether it's
new enough to have alphasort & scandir?

Or you could look into adding check for these functions to CMake
configuration + some define that's used instead of the OS defines...


	- Eero



More information about the hatari-devel mailing list