Socket: code-dup cleanup

Change-Id: I4e8ff6ce0cae7a7084bffec58ef9cd56f1b0f950
cmake: silence odd gcc/clang warning

Change-Id: Iee43e1c6b62c1f6619147163ead278db50cfa7dd
cmake: cleanup

Change-Id: I74c340bc221002f13511c51d2957df4809aac562