CreateNLSocket and CloseNLSocket should return gpointer (mono/mono#15408)
authorRyan Lucia <rylucia@microsoft.com>
Wed, 26 Jun 2019 19:41:11 +0000 (15:41 -0400)
committerGitHub <noreply@github.com>
Wed, 26 Jun 2019 19:41:11 +0000 (15:41 -0400)
commite6e9c1babaae1d6c0393e31d6994bbf324e1adee
tree4e887648c820ce6d335019dc7d5711c0f77e760a
parentf1fbe6fc459c77ed0d9aca9c689d9f36ccf5b916
CreateNLSocket and CloseNLSocket should return gpointer (mono/mono#15408)

In managed, these functions are used as `static external IntPtr`. This means that previously on arm64 the top bits of the return value were garbage. A comparison with 64-bit -1 like in LinuxNetworkChange.EnsureSocket would never be true, which was causing us to hit other assertions in the runtime.
Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/19bb89805ac2eb56b09fed40cab1dd342f97a5e3
src/mono/mono/metadata/icall-decl.h
src/mono/mono/metadata/icall.c