From 976b9b904d86c397e1061b91ac1025d5cb9dc689 Mon Sep 17 00:00:00 2001 From: hchen9 Date: Thu, 2 Jan 2020 21:20:09 -0800 Subject: [PATCH 1/3] Fix mempcpy undefined under macOs --- include/internal.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/internal.h b/include/internal.h index 194823c..ebcc748 100644 --- a/include/internal.h +++ b/include/internal.h @@ -18,6 +18,10 @@ extern "C" { # define evhtp_unlikely(x) (x) #endif +#ifndef mempcpy +# define mempcpy(...) memcpy(__VA_ARGS__) +#endif + #ifndef TAILQ_FOREACH_SAFE #define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = TAILQ_FIRST((head)); \ From 72305141d0998eefdbcff9512d12f157114e8674 Mon Sep 17 00:00:00 2001 From: hchen9 Date: Thu, 2 Jan 2020 21:25:03 -0800 Subject: [PATCH 2/3] Check for apple macos --- include/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/internal.h b/include/internal.h index ebcc748..3afa84a 100644 --- a/include/internal.h +++ b/include/internal.h @@ -18,7 +18,7 @@ extern "C" { # define evhtp_unlikely(x) (x) #endif -#ifndef mempcpy +#if defined __APPLE__ # define mempcpy(...) memcpy(__VA_ARGS__) #endif From c0648fdf5d6eed2c5107458bcb6c9a961b73ff7e Mon Sep 17 00:00:00 2001 From: hchen9 Date: Thu, 2 Jan 2020 21:37:21 -0800 Subject: [PATCH 3/3] Fix typo --- examples/thread_design.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/thread_design.c b/examples/thread_design.c index a337503..d5b2448 100644 --- a/examples/thread_design.c +++ b/examples/thread_design.c @@ -2,7 +2,7 @@ * How to exploit the wonders of libevhtp's threading model to avoid using * libevent's locking API. * - * In this example we use Redis's Async API (Libhiredis) store and retr the following + * In this example we use Redis's Async API (Libhiredis) store and retry the following * information for a request: * * Total requests seen.