Don't try to call _free_osfhnd when not compiling agains the static CRT
authorChristopher Dykes <cdykes@fb.com>
Thu, 10 Nov 2016 20:32:51 +0000 (12:32 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Thu, 10 Nov 2016 20:38:28 +0000 (12:38 -0800)
commita9adcd158b03b8a1b5316a9d1fdb8ccb8b8e9e73
tree4b527d5225e7ed8a0a7dc62e0ac4bac3b2ed2b9c
parenta500df075cf4bec7eaf604b3d85ff597ab5f5f0e
Don't try to call _free_osfhnd when not compiling agains the static CRT

Summary:
Because, unfortunately, it isn't exported from the dynamic CRT dlls :(
There's not really a nice way to handle this when using the dynamic CRT without doing very fragile hocus-pocus that relies on the exact layout and implementation details of the file descriptor table in the CRT, so the best we can really do is close the socket and just let the file descriptor itself leak.

Reviewed By: yfeldblum

Differential Revision: D4156558

fbshipit-source-id: 32cb4bf357f6746cf6597b66649ff9f018fb1bed
folly/portability/Unistd.cpp