--- ncbi-vdb/libs/kapp/CMakeLists.txt.orig	2023-07-10 16:13:36 UTC
+++ ncbi-vdb/libs/kapp/CMakeLists.txt
@@ -23,12 +23,16 @@
 # ===========================================================================
 
 set ( UNIX_SRC unix/args-conv-os.c unix/sysmain.c )
+# Must patch hw.memsize -> hw.usermem
+set ( BSD_SRC ${UNIX_SRC} mac/ram.c )
 set ( LINUX_SRC ${UNIX_SRC} linux/ram.c )
 set ( MAC_SRC ${UNIX_SRC} mac/ram.c )
 set ( WIN_SRC win/args-conv-os.c win/ram.c win/sysmain.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} )
