Old Linux kernels might not support SO_REUSEPORT (dotnet/corefx#31187)
authorEgor Bogatov <egorbo@gmail.com>
Tue, 4 Sep 2018 03:20:18 +0000 (06:20 +0300)
committerTomas Weinfurt <tweinfurt@yahoo.com>
Tue, 4 Sep 2018 03:20:18 +0000 (20:20 -0700)
commitf0043d5849d12d152f55c5e4aaec93bd16f22ce5
treed71fab21934137803c249a670eb53e3f46438000
parent7cbd16ba51968303e0586b63ca8bdc0085dc948b
Old Linux kernels might not support SO_REUSEPORT (dotnet/corefx#31187)

* throw not supported if SO_REUSEPORT is not defined

* Ignore Reuse flag if SO_REUSEPORT is not supported

* remove redundant return Error_SUCCESS;

* move #ifdef SO_REUSEPORT up a bit

* improve #if-else-endif readability

Commit migrated from https://github.com/dotnet/corefx/commit/3c9eb8460600d5a04bfa90bc9a777408c6ff61c3
src/libraries/Native/Unix/System.Native/pal_networking.c