--- Foundation/CMakeLists.txt.orig	2024-04-06 01:56:41.000000000 -0400
+++ Foundation/CMakeLists.txt	2025-06-19 14:57:16.994602000 -0400
@@ -154,7 +154,7 @@
 			if("${CMAKE_SYSTEM_NAME}" STREQUAL "QNX")
 				target_compile_definitions(Foundation PUBLIC _QNX_SOURCE=1 POCO_HAVE_FD_POLL)
 				target_link_libraries(Foundation PUBLIC m socket)
-			elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
+			elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "MidnightBSD")
 				target_compile_definitions(Foundation PUBLIC POCO_HAVE_FD_POLL)
 				target_link_libraries(Foundation PUBLIC pthread ${CMAKE_DL_LIBS} rt)
 			elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "AIX"  OR "${CMAKE_SYSTEM_NAME}" STREQUAL "GNU")
