Files
haikuports/dev-libs/capnproto/patches/capnproto-1.2.0.patchset
Joachim Mairböck c51cbd81d6 capnproto: bump to version 1.2.0, switch to autotools (#12816)
The autotools build system is the recommended one upstream, and it also
includes the cmake config files, so this shouldn't be a problem.
2025-08-24 09:24:07 +02:00

130 lines
4.4 KiB
Plaintext

From 391a50d852211c9358b1cb14a792d5fb43a4a456 Mon Sep 17 00:00:00 2001
From: Han Pengfei <pengphei@qq.com>
Date: Thu, 20 Oct 2022 02:46:51 +0000
Subject: Fix missing pwritev
diff --git a/src/kj/filesystem-disk-unix.c++ b/src/kj/filesystem-disk-unix.c++
index 3b42ed8..d017203 100644
--- a/src/kj/filesystem-disk-unix.c++
+++ b/src/kj/filesystem-disk-unix.c++
@@ -416,7 +416,7 @@ public:
static const byte ZEROS[4096] = { 0 };
-#if __APPLE__ || __CYGWIN__ || (defined(__ANDROID__) && __ANDROID_API__ < 24)
+#if __APPLE__ || __CYGWIN__ || (defined(__ANDROID__) && __ANDROID_API__ < 24) || defined(__HAIKU__)
// Mac & Cygwin & Android API levels 23 and lower doesn't have pwritev().
while (size > sizeof(ZEROS)) {
write(offset, ZEROS);
--
2.50.1
From 2cf49f68d313bbfbe1d6de2511dfaaf5693b52a5 Mon Sep 17 00:00:00 2001
From: Han Pengfei <pengphei@qq.com>
Date: Fri, 28 Oct 2022 02:12:30 +0000
Subject: message: fix sizeof assert for areaspace
diff --git a/src/capnp/message.h b/src/capnp/message.h
index 983761d..2567f1e 100644
--- a/src/capnp/message.h
+++ b/src/capnp/message.h
@@ -127,7 +127,7 @@ public:
private:
ReaderOptions options;
-#if defined(__EMSCRIPTEN__) || (defined(__APPLE__) && (defined(__ppc__) || defined(__i386__)))
+#if defined(__EMSCRIPTEN__) || defined(__HAIKU__) || (defined(__APPLE__) && (defined(__ppc__) || defined(__i386__)))
static constexpr size_t arenaSpacePadding = 19;
#else
static constexpr size_t arenaSpacePadding = 18;
--
2.50.1
From 539397ada0cfdb330da942acbde2216add8b58e7 Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Sat, 23 Sep 2023 13:29:21 +0200
Subject: Fixes for building and running the tests
diff --git a/src/kj/async-unix-test.c++ b/src/kj/async-unix-test.c++
index 64190c4..7873ddc 100644
--- a/src/kj/async-unix-test.c++
+++ b/src/kj/async-unix-test.c++
@@ -54,6 +54,10 @@
#undef SIGRTMIN
#endif
+#ifndef SIGIO
+# define SIGIO -1
+#endif
+
namespace kj {
namespace {
diff --git a/src/kj/filesystem-disk-unix.c++ b/src/kj/filesystem-disk-unix.c++
index d017203..4f3d992 100644
--- a/src/kj/filesystem-disk-unix.c++
+++ b/src/kj/filesystem-disk-unix.c++
@@ -333,7 +333,7 @@ public:
void datasync() const {
// The presence of the _POSIX_SYNCHRONIZED_IO define is supposed to tell us that fdatasync()
// exists. But Apple defines this yet doesn't offer fdatasync(). Thanks, Apple.
-#if _POSIX_SYNCHRONIZED_IO && !__APPLE__
+#if _POSIX_SYNCHRONIZED_IO && !__APPLE__ && !__HAIKU__
KJ_SYSCALL(fdatasync(fd));
#else
this->sync();
diff --git a/src/kj/test-helpers.c++ b/src/kj/test-helpers.c++
index 6ae8cd3..ef00d7e 100644
--- a/src/kj/test-helpers.c++
+++ b/src/kj/test-helpers.c++
@@ -45,7 +45,7 @@ bool hasSubstring(StringPtr haystack, StringPtr needle) {
// Hell, doing a query for an embedded null & dispatching to strstr is still cheaper & only
// marginally slower than the purely naiive implementation.
-#if !defined(_WIN32)
+#if !defined(_WIN32) && !defined(__HAIKU__)
return memmem(haystack.begin(), haystack.size(), needle.begin(), needle.size()) != nullptr;
#else
// TODO(perf): This is not the best algorithm for substring matching. strstr can't be used
--
2.50.1
From c7d15b589b37e0ba95878a0e73ce13fcc5dc9f20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
Date: Sat, 23 Aug 2025 20:42:19 +0200
Subject: Link with libnetwork
diff --git a/Makefile.am b/Makefile.am
index 1567491..c28aa3a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -263,7 +263,7 @@ else
lib_LTLIBRARIES = libkj.la libkj-test.la libkj-async.la libkj-http.la $(MAYBE_KJ_TLS_LA) $(MAYBE_KJ_GZIP_LA) libcapnp.la libcapnp-rpc.la libcapnp-json.la libcapnp-websocket.la libcapnpc.la
endif
-libkj_la_LIBADD = $(PTHREAD_LIBS)
+libkj_la_LIBADD = $(PTHREAD_LIBS) -lnetwork
libkj_la_LDFLAGS = -release $(SO_VERSION) -no-undefined
libkj_la_SOURCES= \
src/kj/cidr.c++ \
@@ -561,7 +561,8 @@ capnp_test_LDADD = \
libkj-test.la \
libkj.la \
$(ASYNC_LIBS) \
- $(PTHREAD_LIBS)
+ $(PTHREAD_LIBS) \
+ -lnetwork
endif !LITE_MODE
--
2.50.1