--- ncbi-vdb/libs/klib/CMakeLists.txt.orig	2023-07-10 16:13:36 UTC
+++ ncbi-vdb/libs/klib/CMakeLists.txt
@@ -24,12 +24,15 @@
 
 set ( UNIX_BASE_SRC unix/misc.c unix/syslog.c unix/systime.c unix/syswriter.c )
 set ( UNIX_SRC ${UNIX_BASE_SRC} unix/syserrcode.c )
+set ( BSD_SRC ${UNIX_SRC} )
 set ( LINUX_SRC ${UNIX_BASE_SRC} linux/syserrcode.c )
 set ( MAC_SRC ${UNIX_SRC} )
 set ( WIN_SRC win/misc.c win/sysalloc.c win/syserrcode.c win/syslog.c win/systime.c win/syswriter.c )
 
 if ( "windows" STREQUAL ${OS} )
     set ( OS_SPECIFIC_SRC ${WIN_SRC} )
+elseif( "bsd" STREQUAL ${OS} )
+    set ( OS_SPECIFIC_SRC ${BSD_SRC} )
 elseif( "linux" STREQUAL ${OS} )
     set ( OS_SPECIFIC_SRC ${LINUX_SRC} )
 elseif( "mac" STREQUAL ${OS} )
