$NetBSD: patch-sql_CMakeLists.txt,v 1.1 2021/05/13 15:25:20 jdolecek Exp $

* use a provided ffsll implementation if the system does not have one
* use noop implementation (apple) for binding threads to a cpu
TODO: netbsd and irix has apis for this, perhaps implement this.

--- sql/CMakeLists.txt.orig	2021-03-22 08:44:50.000000000 +0000
+++ sql/CMakeLists.txt
@@ -589,6 +589,10 @@ SET(SQL_SHARED_SOURCES
   daemon_proxy_keyring/daemon_proxy_keyring.cc
 )
 
+IF(NOT HAVE_FFSLL)
+LIST(APPEND SQL_SHARED_SOURCES ffsll.cc)
+ENDIF()
+
 # BISON_TARGET(<Name> <YaccInput> <CodeOutput>
 #              [COMPILE_FLAGS <flags>]
 #              [DEFINES_FILE <file>]
@@ -689,6 +693,9 @@ ELSEIF(SOLARIS)
 ELSEIF(WIN32)
   LIST(APPEND SQL_SHARED_SOURCES
     resourcegroups/platform/thread_attrs_api_win.cc)
+ELSE()
+  LIST(APPEND SQL_SHARED_SOURCES
+    resourcegroups/platform/thread_attrs_api_apple.cc)
 ENDIF()
 
 SET(SQL_SOURCE
