GNOME Bugzilla – Bug 756054
MSVC linker error due to 'g_socket_send_message_with_timeout()'
Last modified: 2015-10-05 15:16:28 UTC
When building 'gio/gsocket.c' (from git master - 4th Oct 2015) there's a call to 'g_socket_send_message_with_timeout()' at around line 4470. MSVC's linker flags this up as an unresolved symbol. Where should that function be coming from?
Hi John, Apparently the issue is the implementation of g_socket_send_message_with_timeout() was missing when it was used in a0cefc2, for Windows. Hi Philip, Any ideas about this? With blessings, thank you!
Created attachment 312665 [details] [review] (In reply to Fan, Chun-wei from comment #1) > Apparently the issue is the implementation of > g_socket_send_message_with_timeout() was missing when it was used in > a0cefc2, for Windows. Whoops, looks like a rebase problem from when I was writing that patch. Here’s a patch which adds the necessary function. I cannot test this on Windows though — could one of you please give it a test and make sure `make check` passes for it? I hope I haven’t introduced any regressions to GSocket on Windows with my recent changes there. --- gsocket: Fix g_socket_send_messages_with_timeout() on win32 Commit a0cefc2217adafb6a21d87b66115df6abc9a9cdd introduced an unresolved symbol, g_socket_send_message_with_timeout(), on win32. Windows unfortunately isn’t clever enough to fill in the gaps and magic up the implementation of that function from nowhere, so we had better do it ourselves. Factor the blocking behaviour out of g_socket_send_message() into a new internal g_socket_send_message_with_timeout().
Personally I don't build with 'make'. But I can confirm that the patch applied cleanly and MSVC is a lot happier this morning :-) Thanks for dealing with this so promptly.
Merged.