<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40445 >

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

Hi there,
I just tried to compile the new freeciv 2.1.6 with --enable-debug=yes,
but unfortunately I get this compile error:

gcc -DHAVE_CONFIG_H -I. -I..  -I../utility -I./../common -I./../ai
- -I../intl -I../common/aicore -I./generator -I./scripting
- -DLOCALEDIR="\"/usr/local/share/locale\""
- -DDEFAULT_DATA_PATH="\".:data:~/.freeciv:/usr/local/share/freeciv\""
- -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes
- -Wmissing-declarations -Werror -g -O2 -MT sernet.o -MD -MP -MF
.deps/sernet.Tpo -c -o sernet.o sernet.c
cc1: warnings being treated as errors
sernet.c: In function ‘server_sniff_all_input’:
sernet.c:714: error: format ‘%ld’ expects type ‘long int’, but argument
4 has type ‘ssize_t’
sernet.c:714: error: format ‘%ld’ expects type ‘long int’, but argument
5 has type ‘size_t’
make[3]: *** [sernet.o] Error 1
make[3]: Leaving directory
`/home/tux-control/Desktop/freeciv-2.1.6/freeciv-2.1.6/server'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/tux-control/Desktop/freeciv-2.1.6/freeciv-2.1.6/server'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/tux-control/Desktop/freeciv-2.1.6/freeciv-2.1.6'
make: *** [all] Error 2

This problem can be fixed by changing line 714 in sernet.c to
freelog(LOG_DEBUG, "Got line: \"%s\" (%ld, %ld)", buffer, (long
int)didget, (long int)len);

With this fix it compiles perfectly with --enable-debug=yes.

Thanks for your work on freeciv!

Tristan Hoffmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkin1C8ACgkQSufthXk+NIHX4wCeOsGD4MmJrYFy5mh1tQ6NuEcq
KYwAn0KPuUwqN2vIfb4l4fpocR/a4pBf
=6xVa
-----END PGP SIGNATURE-----



_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to