1 From f5ad737d73ed18b95ce63f1d8e933a89a26653e9 Mon Sep 17 00:00:00 2001
2 From: Azat Khuzhin <azat@libevent.org>
3 Date: Sat, 9 Jul 2022 14:22:38 +0300
4 Subject: [PATCH] Add -Wundef for cmake and fix EVENT__SIZEOF_TIME_T usage
6 Note, autotools already supports it.
9 event-config.h.cmake | 3 +++
10 2 files changed, 4 insertions(+)
12 diff --git a/CMakeLists.txt b/CMakeLists.txt
13 index 5ee0df2f7..9237252c7 100644
16 @@ -295,6 +295,7 @@ if (${GNUC})
19 -Wall -Wextra -Wno-unused-parameter -Wstrict-aliasing -Wstrict-prototypes
22 -fno-strict-aliasing # gcc 2.9.5+
24 diff --git a/event-config.h.cmake b/event-config.h.cmake
25 index 9fff34877..4a6267017 100644
26 --- a/event-config.h.cmake
27 +++ b/event-config.h.cmake
29 /* The size of 'void *', as computer by sizeof */
30 #define EVENT__SIZEOF_VOID_P @EVENT__SIZEOF_VOID_P@
32 +/* The size of 'time_t', as computer by sizeof */
33 +#define EVENT__SIZEOF_TIME_T @EVENT__SIZEOF_TIME_T@
35 /* Define to `__inline__' or `__inline' if that's what the C compiler
36 calls it, or to nothing if 'inline' is not supported under any name. */