summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDouglas B. Rumbaugh <dbr4@psu.edu>2024-03-25 12:54:17 -0400
committerDouglas B. Rumbaugh <dbr4@psu.edu>2024-03-25 12:54:17 -0400
commitb1b5ab106122e6917f6b34452be95e617506f05d (patch)
tree1fea7e8b097077204b9cff12a4acbf66e857ed3b /include
parentfb4312a883dd0e382ecbcfe1119479e6f44d32a6 (diff)
downloaddynamic-extension-b1b5ab106122e6917f6b34452be95e617506f05d.tar.gz
Updates for build on OpenBSD
Necessary updates to get the codebase building under OpenBSD 7.5 with clang. This is a minimal set of changes to get building to work, which includes disabling several things that aren't directly compatable. More work will be necessary to get full functionality. In particular, Triespline, PGM, and the reference M-tree do not currently build on OpenBSD with clang due to GNU dependencies or other gcc specific features.
Diffstat (limited to 'include')
-rw-r--r--include/framework/DynamicExtension.h6
-rw-r--r--include/framework/structure/BufferView.h2
-rw-r--r--include/query/rangequery.h2
-rw-r--r--include/util/SortedMerge.h2
4 files changed, 9 insertions, 3 deletions
diff --git a/include/framework/DynamicExtension.h b/include/framework/DynamicExtension.h
index 3e1ce50..44ad454 100644
--- a/include/framework/DynamicExtension.h
+++ b/include/framework/DynamicExtension.h
@@ -685,6 +685,7 @@ private:
return processed_records;
}
+#ifdef _GNU_SOURCE
void SetThreadAffinity() {
int core = m_next_core.fetch_add(1) % m_core_cnt;
cpu_set_t mask;
@@ -707,6 +708,11 @@ private:
CPU_SET(core, &mask);
::sched_setaffinity(0, sizeof(mask), &mask);
}
+#else
+ void SetThreadAffinity() {
+
+ }
+#endif
void end_job(_Epoch *epoch) {
diff --git a/include/framework/structure/BufferView.h b/include/framework/structure/BufferView.h
index 9e0872b..44a2044 100644
--- a/include/framework/structure/BufferView.h
+++ b/include/framework/structure/BufferView.h
@@ -20,7 +20,7 @@
namespace de {
-typedef std::_Bind<void (*(void*, long unsigned int))(void*, long unsigned int)> ReleaseFunction;
+typedef std::function<void(void)> ReleaseFunction;
template <RecordInterface R>
class BufferView {
diff --git a/include/query/rangequery.h b/include/query/rangequery.h
index 24b38ec..e6ab581 100644
--- a/include/query/rangequery.h
+++ b/include/query/rangequery.h
@@ -121,7 +121,7 @@ public:
for (size_t i = 0; i < tmp_n; ++i)
if (results[i].size() > 0){
auto base = results[i].data();
- cursors.emplace_back(Cursor{base, base + results[i].size(), 0, results[i].size()});
+ cursors.emplace_back(Cursor<Wrapped<R>>{base, base + results[i].size(), 0, results[i].size()});
assert(i == cursors.size() - 1);
total += results[i].size();
pq.push(cursors[i].ptr, tmp_n - i - 1);
diff --git a/include/util/SortedMerge.h b/include/util/SortedMerge.h
index 8a1e782..c149189 100644
--- a/include/util/SortedMerge.h
+++ b/include/util/SortedMerge.h
@@ -58,7 +58,7 @@ static std::vector<Cursor<Wrapped<R>>> build_cursor_vec(std::vector<S*> &shards,
for (size_t i = 0; i < shards.size(); ++i) {
if (shards[i]) {
auto base = shards[i]->get_data();
- cursors.emplace_back(Cursor{base, base + shards[i]->get_record_count(), 0, shards[i]->get_record_count()});
+ cursors.emplace_back(Cursor<Wrapped<R>>{base, base + shards[i]->get_record_count(), 0, shards[i]->get_record_count()});
*reccnt += shards[i]->get_record_count();
*tscnt += shards[i]->get_tombstone_count();
} else {