Created attachment 415040 [details, diff] gdal-2.0.0-r29668-glibc222.patch tmp/portage/sci-libs/gdal-2.0.0-r1/work/gdal-2.0.0/alg -I/var/tmp/portage/sci-libs/gdal-2.0.0-r1/work/gdal-2.0.0/ogr -I/var/tmp/portage/sci-libs/gdal-2.0.0-r1/work/gdal-2.0.0/ogr/ogrsf_frmts -O2 -pipe -g -mtune=native -march=native -fPIC -Wall -Wdeclaration-after-statement -I/var/tmp/portage/sci-libs/gdal-2.0.0-r1/work/gdal-2.0.0/frmts/vrt -DOGR_ENABLED -I/var/tmp/portage/sci-libs/gdal-2.0.0-r1/work/gdal-2.0.0/port -I/usr/ -I/usr//include -DGDAL_COMPILATION -I/usr/include/json-c -I/var/tmp/portage/sci-libs/gdal-2.0.0-r1/work/gdal-2.0.0/ogr/ogrsf_frmts/geojson -c -o gdalserver.o gdalserver.c gdalserver.c: In function ‘CreateSocketAndBindAndListen’: gdalserver.c:124:21: error: storage size of ‘sHints’ isn’t known struct addrinfo sHints; ^ gdalserver.c:126:31: error: invalid application of ‘sizeof’ to incomplete type ‘struct addrinfo’ memset(&sHints, 0, sizeof(struct addrinfo)); ^ gdalserver.c:129:23: error: ‘AI_PASSIVE’ undeclared (first use in this function) sHints.ai_flags = AI_PASSIVE; ^ gdalserver.c:129:23: note: each undeclared identifier is reported only once for each function it appears in gdalserver.c:132:12: warning: implicit declaration of function ‘getaddrinfo’ [-Wimplicit-function-declaration] nRet = getaddrinfo(NULL, pszService, &sHints, &psResults); ^ gdalserver.c:135:47: warning: implicit declaration of function ‘gai_strerror’ [-Wimplicit-function-declaration] fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(nRet)); ^ gdalserver.c:135:24: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat=] fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(nRet)); ^ gdalserver.c:141:39: error: dereferencing pointer to incomplete type ‘struct addrinfo’ psResultsIter = psResultsIter->ai_next) ^ gdalserver.c:162:5: warning: implicit declaration of function ‘freeaddrinfo’ [-Wimplicit-function-declaration] freeaddrinfo(psResults); ^ gdalserver.c:124:21: warning: unused variable ‘sHints’ [-Wunused-variable] struct addrinfo sHints; ^ ../GDALmake.opt:583: recipe for target 'gdalserver.o' failed make[1]: *** [gdalserver.o] Error 1 make[1]: Leaving directory '/var/tmp/portage/sci-libs/gdal-2.0.0-r1/work/gdal-2.0.0/apps' GNUmakefile:67: recipe for target 'apps-target' failed make: *** [apps-target] Error 2 * ERROR: sci-libs/gdal-2.0.0-r1::gentoo failed (compile phase): * emake failed . . Attached patch applies upstream's already-in-tree solution to this: https://trac.osgeo.org/gdal/changeset/29668?format=diff&new=29668
commit 26928529bd50baa3f6a6ef0a77eb4012c82a0fd1 Author: Justin Lecher <jlec@gentoo.org> Date: Sat Oct 24 19:22:40 2015 +0200 sci-libs/gdal: Backport patch for glibc-2.22 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=563608 Package-Manager: portage-2.2.23 Signed-off-by: Justin Lecher <jlec@gentoo.org> https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26928529bd50baa3f6a6ef0a77eb4012c82a0fd1