[crossfire] [PATCH] Crossfire client linking fails in trunk

Tolga Dalman tolga.dalman at googlemail.com
Tue Aug 12 03:12:28 CDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/12/2014 04:42 AM, Kevin Zheng wrote:
> On 08/11/2014 14:16, Tolga Dalman wrote:
>> Naturally, I would compile with -std=gnu99, but that's not a portable 
>> solution :)
> 
> Actually, the current `configure` script already adds "-std=gnu99" or some
> variant thereof behind your back. While getaddrinfo(3) is a POSIX 
> extension, it is still relatively portable. On Windows, this issue is taken
> care of with a few preprocessor definitions.

What configure script ?? I just did

	$ mkdir build; cd build; cmake ..; make

> It may not even be this problem at all. I need to go take a closer look at
> the code; it may be just that we're missing a header file.
> 
>> /home/tdalman/src/crossfire/client/trunk/common/client.c:497:5: warning: 
>> implicit declaration of function 'freeaddrinfo'
>> [-Wimplicit-function-declaration] freeaddrinfo(res); ^
> 
> Ditto, although I'm fairly certain this is due to a missing header.

Yes, replacing std=c99 by std=gnu99 defines the necessary POSIX extension
macros and, thus, fixes all errors.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJT6cxsAAoJEATLYSm2cxP9yzAH/2186LXDDXT65vVDw8Gt6Fol
QeVls90TagNp75bXx5YARTO2gaFi+s8QUBnm5LafIVQZqY7wTn5tq1sc70q7CA7l
BFzGKaKmtaB0iUVtrPM6GGPSf6jTK6g2xIhvcwHMgXj435bVeMlKk2VK3jMAzIQ5
l1xmpaEYlqFkuZdHaEj221o2+VM6XTN+9YV7MUwq3Xu0qbhBO+PNYWSzN3NCFIC9
zfhXcbTsPph60GIVLpI2un6SXiwMI/qAuXY7UJhBTlYbImLDtTxJUlB20qCuUpFl
gMcdnQJlVq3GQgmLluQT3nzt7STUiDKotwnKGaaohMwMwTePrYwuLjuBpYtK30I=
=L3xX
-----END PGP SIGNATURE-----


More information about the crossfire mailing list