From 3bf993624469a0fa93a792c85fcb472462092fdb Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 28 Apr 2025 00:26:12 +0000 Subject: [PATCH] redefined some primitive types --- ctx.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/ctx.c b/ctx.c index 344322a..939da57 100644 --- a/ctx.c +++ b/ctx.c @@ -6,16 +6,28 @@ #include #include #include -#include + +#if defined(__NetBSD__) +#include +#include +#else +#include #include +#endif typedef unsigned char hip_uint8_t; typedef unsigned short hip_uint16_t; typedef unsigned int hip_uint32_t; typedef unsigned long long hip_uint64_t; -typedef unsigned long hip_oow_t; -typedef signed long hip_ooi_t; + +typedef signed char hip_int8_t; +typedef signed short hip_int16_t; +typedef signed int hip_int32_t; +typedef signed long long hip_int64_t; + +typedef hip_uint64_t hip_oow_t; +typedef hip_int64_t hip_ooi_t; typedef hip_uint64_t hip_nsecdur_t; @@ -322,7 +334,11 @@ hip_t* hip_open(void) sigprocmask(SIG_SETMASK, &oldsm, HIP_NULL); +#if defined(__NetBSD__) + hip->mux_id = kqueue1(O_CLOEXEC); +#else hip->mux_id = epoll_create1(EPOLL_CLOEXEC); +#endif if (hip->mux_id <= -1) { timer_delete(tid);