fix linking of kdecore

Peter Kümmel syntheticpp at gmx.net
Sun Oct 22 17:11:52 CEST 2006


Christian Ehrlicher wrote:
>> Here the error looks like this:
>> KDE::getnameinfo(sockaddr const*, int, char*, unsigned int, char*, unsigned int, int)'


I think its a configure problem, when I add

Index: network/ConfigureChecks.cmake
===================================================================
--- network/ConfigureChecks.cmake       (revision 598101)
+++ network/ConfigureChecks.cmake       (working copy)
@@ -17,9 +17,15 @@

 check_prototype_exists(getservbyname_r netdb.h      HAVE_GETSERVBYNAME_R_PROTO)

-check_symbol_exists(freeaddrinfo    "sys/socket.h;netdb.h"     HAVE_FREEADDRINFO)
-check_symbol_exists(getnameinfo     "sys/socket.h;netdb.h"     HAVE_GETNAMEINFO)
-check_symbol_exists(getaddrinfo     "sys/socket.h;netdb.h"     HAVE_GETADDRINFO)
+if(UNIX)
+check_symbol_exists(freeaddrinfo    "sys/socket.h;netdb.h;ws2tcpip.h"     HAVE_FREEADDRINFO)
+check_symbol_exists(getnameinfo     "sys/socket.h;netdb.h;ws2tcpip.h"     HAVE_GETNAMEINFO)
+check_symbol_exists(getaddrinfo     "sys/socket.h;netdb.h;ws2tcpip.h"     HAVE_GETADDRINFO)
+else(UNIX)
+check_symbol_exists(freeaddrinfo    "ws2tcpip.h"     HAVE_FREEADDRINFO)
+check_symbol_exists(getnameinfo     "ws2tcpip.h"     HAVE_GETNAMEINFO)
+check_symbol_exists(getaddrinfo     "ws2tcpip.h"     HAVE_GETADDRINFO)
+endif(UNIX)

and hack the mingw header

#if (_WIN32_WINNT >= 0x0501) ------------> 0x0101
void WSAAPI freeaddrinfo (struct addrinfo*);
int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*,
		        struct addrinfo**);
int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD,
		       char*,DWORD,int);
#else


it works. So we have to add a test which have set the correct _WIN32_WINNT
version.





More information about the Kde-windows mailing list