archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libevent / trunk / EVENT__SIZEOF_TIME_T.patch
blob30089040df328a2441366a2ece134cfab3d1ee25
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.
7 ---
8 CMakeLists.txt | 1 +
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
14 --- a/CMakeLists.txt
15 +++ b/CMakeLists.txt
16 @@ -295,6 +295,7 @@ if (${GNUC})
18 list(APPEND __FLAGS
19 -Wall -Wextra -Wno-unused-parameter -Wstrict-aliasing -Wstrict-prototypes
20 + -Wundef
22 -fno-strict-aliasing # gcc 2.9.5+
23 -Wmissing-prototypes
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
28 @@ -485,6 +485,9 @@
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. */
37 #ifndef __cplusplus