[ZBX-596] freeaddrinfo not located in WS2_32.dll on pre Windows XP Created: 2008 Nov 12  Updated: 2017 May 30  Resolved: 2009 Sep 23

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 1.6
Fix Version/s: 1.6.6, 1.9.0 (alpha)

Type: Incident report Priority: Critical
Reporter: Brendan Gilmore Assignee: Alexander Vladishev
Resolution: Fixed Votes: 11
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 2000 Professional SP4, Zabbix Agent 1.6.1 from distribution


Attachments: File fix-freeaddrinfo.patch    

 Description   

zabbix_agentd.exe gives this error when run on pre Windows XP systems:
zabbix_agentd.exe - Entry Point Not Found
The procedure entry point freeaddrinfo could not be located in the dynamic link library WS2_32.dll.

See http://www.zabbix.com/forum/showthread.php?p=39592 for discussion

Probable solution from http://msdn.microsoft.com/en-us/library/ms737931(VS.85).aspx
Support for freeaddrinfo on earlier versions of Windows

The freeaddrinfo function was added to the Ws2_32.dll on Windows XP and later. To execute an application using this function on earlier versions of Windows (Windows 2000, Windows NT, and Windows Me/98/95), then you must include the Ws2tcpip.h file and also include the Wspiapi.h file. When the Wspiapi.h include file is added, the freeaddrinfo function is defined to the WspiapiFreeAddrInfo inline function in the Wspiapi.h file. At runtime, the WspiapiFreeAddrInfo function is implemented in such a way that if the Ws2_32.dll or the Wship6.dll (the file containing freeaddrinfo in the IPv6 Technology Preview for Windows 2000) does not include freeaddrinfo, then a version of freeaddrinfo is implemented inline based on code in the Wspiapi.h header file. This inline code will be used on older Windows platforms that do not natively support the freeaddrinfo function.



 Comments   
Comment by Takanori Suzuki [ 2009 Jun 16 ]
  • fix-freeaddrinfo.patch
    I added include file "Ws2tcpip.h" and "Wspiapi.h" for Windows 2000.
    I checked this patch works on Windows 2000 Server with patch I attached in ZBX-959.
Comment by Alexei Vladishev [ 2009 Sep 22 ]

Sorry, status to Resolved was set incidentally. Reverting back...

Alexei

Comment by Alexander Vladishev [ 2009 Sep 23 ]

Fixed in version pre1.6.7, revision 7945.

Generated at Fri Apr 26 20:18:08 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.