After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756054 - MSVC linker error due to 'g_socket_send_message_with_timeout()'
MSVC linker error due to 'g_socket_send_message_with_timeout()'
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: network
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-10-04 16:21 UTC by John E
Modified: 2015-10-05 15:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
(In reply to Fan, Chun-wei from comment #1) (5.10 KB, patch)
2015-10-05 09:23 UTC, Philip Withnall
committed Details | Review

Description John E 2015-10-04 16:21:06 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?
Comment 1 Fan, Chun-wei 2015-10-05 08:23:05 UTC
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!
Comment 2 Philip Withnall 2015-10-05 09:23:28 UTC
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().
Comment 3 John E 2015-10-05 10:26:08 UTC
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.
Comment 4 Philip Withnall 2015-10-05 15:16:24 UTC
Merged.