summaryrefslogtreecommitdiffstats
path: root/meta-webserver
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-11-10 16:05:00 -0800
committerKhem Raj <raj.khem@gmail.com>2019-11-11 21:21:13 -0800
commit037dc77fa7c4718f3bfe48e6b2b83533640c51ea (patch)
tree1c9e564094a0e9c239abb759e055233f95ac47df /meta-webserver
parentbc3b2149d0612d8f942ef3e8ac32e348abf8bcc7 (diff)
downloadmeta-openembedded-037dc77fa7c4718f3bfe48e6b2b83533640c51ea.tar.gz
cherokee: Fix build when time_t is 64bit
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-webserver')
-rw-r--r--meta-webserver/recipes-httpd/cherokee/cherokee/0001-common-internal.h-Define-LLONG_MAX-if-undefined.patch47
-rw-r--r--meta-webserver/recipes-httpd/cherokee/cherokee_git.bb1
2 files changed, 48 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/cherokee/cherokee/0001-common-internal.h-Define-LLONG_MAX-if-undefined.patch b/meta-webserver/recipes-httpd/cherokee/cherokee/0001-common-internal.h-Define-LLONG_MAX-if-undefined.patch
new file mode 100644
index 000000000..0f4384275
--- /dev/null
+++ b/meta-webserver/recipes-httpd/cherokee/cherokee/0001-common-internal.h-Define-LLONG_MAX-if-undefined.patch
@@ -0,0 +1,47 @@
1From c73415021f3f3b2b30062ab74b25fe49c51c2242 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 10 Nov 2019 15:59:44 -0800
4Subject: [PATCH] common-internal.h: Define LLONG_MAX if undefined
5
6time_t can also be long long type, therefore check for that as fallback
7Fixes build on 32bit hosts where time_t is fixed for Y2K38
8
9Upstream-Status: Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 cherokee/common-internal.h | 12 ++++++++++++
13 1 file changed, 12 insertions(+)
14
15diff --git a/cherokee/common-internal.h b/cherokee/common-internal.h
16index 5c28da97..5646ec0f 100644
17--- a/cherokee/common-internal.h
18+++ b/cherokee/common-internal.h
19@@ -222,6 +222,16 @@ char *strcasestr(char *s, char *find);
20 # endif
21 #endif
22
23+/* Long Long limit
24+ */
25+#ifndef LLONG_MAX
26+# if (__SIZEOF_LONG_LONG__ == 8)
27+# define LLONG_MAX 0x7fffffffffffffffLL
28+# else
29+# error "Can't define LLONG_MAX"
30+# endif
31+#endif
32+
33 /* time_t limit
34 */
35 #ifndef TIME_MAX
36@@ -229,6 +239,8 @@ char *strcasestr(char *s, char *find);
37 # define TIME_MAX ((time_t)INT_MAX)
38 # elif (SIZEOF_TIME_T == SIZEOF_LONG)
39 # define TIME_MAX ((time_t)LONG_MAX)
40+# elif (SIZEOF_TIME_T == __SIZEOF_LONG_LONG__)
41+# define TIME_MAX ((time_t)LLONG_MAX)
42 # else
43 # error "Can't define TIME_MAX"
44 # endif
45--
462.24.0
47
diff --git a/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb b/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb
index 69d64725e..490fc53f9 100644
--- a/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb
+++ b/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb
@@ -15,6 +15,7 @@ SRC_URI = "git://github.com/cherokee/webserver \
15 file://cherokee-install-configured.py-once.patch \ 15 file://cherokee-install-configured.py-once.patch \
16 file://0001-configure.ac-Add-foreign-to-AM_INIT_AUTOMAKE.patch \ 16 file://0001-configure.ac-Add-foreign-to-AM_INIT_AUTOMAKE.patch \
17 file://0001-make-Do-not-build-po-files.patch \ 17 file://0001-make-Do-not-build-po-files.patch \
18 file://0001-common-internal.h-Define-LLONG_MAX-if-undefined.patch \
18" 19"
19 20
20S = "${WORKDIR}/git" 21S = "${WORKDIR}/git"