From aa1d3f75266cb4a526f079e67101030fdb5211e6 Mon Sep 17 00:00:00 2001 From: levalup Date: Sun, 16 Jun 2024 12:46:14 +0800 Subject: [PATCH] add version control as random is new in 1.33.0 --- include/uvcxx/random.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/uvcxx/random.h b/include/uvcxx/random.h index 28e4eec..a7ac480 100644 --- a/include/uvcxx/random.h +++ b/include/uvcxx/random.h @@ -10,6 +10,8 @@ #include "req.h" namespace uv { +#if UVCXX_SATISFY_VERSION(1, 33, 0) + class random_t : public inherit_req_t { public: using self = random_t; @@ -70,6 +72,8 @@ namespace uv { void *buf, size_t buflen, unsigned int flags) { return random(default_loop(), req, buf, buflen, flags); } + +#endif } #endif //LIBUVCXX_RANDOM_H