pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/objfw
Module Name: pkgsrc
Committed By: ryoon
Date: Mon Aug 15 14:56:04 UTC 2022
Modified Files:
pkgsrc/devel/objfw: distinfo
Added Files:
pkgsrc/devel/objfw/patches: patch-src_OFKernelEventObserver__kqueue.m
patch-src_threading__pthread.m
Log Message:
objfw: Fix build and tests under NetBSD
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/objfw/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/devel/objfw/patches/patch-src_OFKernelEventObserver__kqueue.m \
pkgsrc/devel/objfw/patches/patch-src_threading__pthread.m
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/objfw/distinfo
diff -u pkgsrc/devel/objfw/distinfo:1.4 pkgsrc/devel/objfw/distinfo:1.5
--- pkgsrc/devel/objfw/distinfo:1.4 Tue Oct 26 10:15:44 2021
+++ pkgsrc/devel/objfw/distinfo Mon Aug 15 14:56:04 2022
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.4 2021/10/26 10:15:44 nia Exp $
+$NetBSD: distinfo,v 1.5 2022/08/15 14:56:04 ryoon Exp $
BLAKE2s (objfw-0.90.2.tar.gz) = 4fe99a0a775aed1270bbd549b1bef0eb23170022b897c5e6f9566caf1b3720a2
SHA512 (objfw-0.90.2.tar.gz) = c894befe9388a5fce9c0e18fbd737f995af9923d52cfb3c8c1faca8879121cd68654d8e262f6a9fdb1578073dd70e5364737ad5ffaa483d9553d6a549af2ec67
Size (objfw-0.90.2.tar.gz) = 650744 bytes
+SHA1 (patch-src_OFKernelEventObserver__kqueue.m) = 4dc82606f5db15bf109cdf6bdf5ed886212a1d22
+SHA1 (patch-src_threading__pthread.m) = 3bc4948a25bfc261e83984524539e49066a6a59c
Added files:
Index: pkgsrc/devel/objfw/patches/patch-src_OFKernelEventObserver__kqueue.m
diff -u /dev/null pkgsrc/devel/objfw/patches/patch-src_OFKernelEventObserver__kqueue.m:1.1
--- /dev/null Mon Aug 15 14:56:04 2022
+++ pkgsrc/devel/objfw/patches/patch-src_OFKernelEventObserver__kqueue.m Mon Aug 15 14:56:04 2022
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_OFKernelEventObserver__kqueue.m,v 1.1 2022/08/15 14:56:04 ryoon Exp $
+
+* Fix build for kqueue under NetBSD.
+
+--- src/OFKernelEventObserver_kqueue.m.orig 2017-10-23 21:05:22.000000000 +0000
++++ src/OFKernelEventObserver_kqueue.m
+@@ -97,7 +97,7 @@
+ #ifndef OF_NETBSD
+ event.udata = object;
+ #else
+- event.udata = (intptr_t)object;
++ event.udata = (__typeof__(event.udata))object;
+ #endif
+
+ if (kevent(_kernelQueue, &event, 1, NULL, 0, NULL) != 0)
+@@ -116,7 +116,7 @@
+ #ifndef OF_NETBSD
+ event.udata = object;
+ #else
+- event.udata = (intptr_t)object;
++ event.udata = (__typeof__(event.udata))object;
+ #endif
+
+ if (kevent(_kernelQueue, &event, 1, NULL, 0, NULL) != 0)
Index: pkgsrc/devel/objfw/patches/patch-src_threading__pthread.m
diff -u /dev/null pkgsrc/devel/objfw/patches/patch-src_threading__pthread.m:1.1
--- /dev/null Mon Aug 15 14:56:04 2022
+++ pkgsrc/devel/objfw/patches/patch-src_threading__pthread.m Mon Aug 15 14:56:04 2022
@@ -0,0 +1,36 @@
+$NetBSD: patch-src_threading__pthread.m,v 1.1 2022/08/15 14:56:04 ryoon Exp $
+
+* Do not fail under NetBSD.
+
+--- src/threading_pthread.m.orig 2017-10-23 21:05:22.000000000 +0000
++++ src/threading_pthread.m
+@@ -40,16 +40,28 @@ struct thread_ctx {
+ OF_CONSTRUCTOR()
+ {
+ pthread_attr_t pattr;
++
++ OF_ENSURE(pthread_attr_init(&pattr) == 0);
++/*
++ * NetBSD's default policy, SCHED_OTHER, does not support priority.
++ * And sched_get_priority_min() and sched_get_priority_max()
++ * return (-1) in SCHED_OTHER case.
++ */
++#if !defined(OF_NETBSD)
+ int policy;
+ struct sched_param param;
+
+- OF_ENSURE(pthread_attr_init(&pattr) == 0);
+ OF_ENSURE(pthread_attr_getschedpolicy(&pattr, &policy) == 0);
+ OF_ENSURE((minPrio = sched_get_priority_min(policy)) != -1);
+ OF_ENSURE((maxPrio = sched_get_priority_max(policy)) != -1);
+ OF_ENSURE(pthread_attr_getschedparam(&pattr, ¶m) == 0);
+
+ normalPrio = param.sched_priority;
++#else
++ minPrio = 0;
++ maxPrio = 0;
++ normalPrio = 0;
++#endif
+
+ pthread_attr_destroy(&pattr);
+ }
Home |
Main Index |
Thread Index |
Old Index