Needed for setsockopt() and socketpair().

--- protobuf-24.4/cmake/tests.cmake.orig
+++ protobuf-24.4/cmake/tests.cmake
@@ -90,6 +90,7 @@
   ${common_test_files}
   ${tests_proto_files}
 )
+target_link_libraries(tests socket nsl)
 if (MSVC)
   target_compile_options(tests PRIVATE
     /wd4146 # unary minus operator applied to unsigned type, result still unsigned