head 1.1; access; symbols pkgsrc-2026Q3:1.1.0.2 pkgsrc-2026Q3-base:1.1; locks; strict; comment @ * @; 1.1 date 2026.09.11.12.53.14; author drixter; state Exp; branches; next ; commitid ZQGdhSeScFK6GcVG; desc @@ 1.1 log @knot: Patch from upstream to work on SmartOS #980 @ text @$NetBSD$ Patch from upstream to work on SmartOS #980 --- tests/contrib/test_atomic.c.orig 2026-09-10 17:48:19.686990159 +0000 +++ tests/contrib/test_atomic.c @@@@ -6,6 +6,7 @@@@ #include #include #include +#include #include "contrib/atomic.h" #include "knot/server/dthreads.h" @@@@ -49,11 +50,10 @@@@ static int thread_add(struct dthread *th static int thread_set(struct dthread *thread) { - u_int64_t val = (dt_get_id(thread) % 2) ? UPPER : LOWER; - + uint64_t val = (dt_get_id(thread) % 2) ? UPPER : LOWER; for (int i = 0; i < CYCLES2; i++) { ATOMIC_SET(atomic_var, val); - volatile u_int64_t read = ATOMIC_GET(atomic_var); + volatile uint64_t read = ATOMIC_GET(atomic_var); if (read != UPPER && read != LOWER) { // Non-atomic counter, won't be accurate! // However, it's sufficient for fault detection. @