[oe-commits] [meta-openembedded] 01/12: cherokee: Fix build when time_t is 64bit

git at git.openembedded.org git at git.openembedded.org
Tue Nov 12 05:21:32 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit 037dc77fa7c4718f3bfe48e6b2b83533640c51ea
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Sun Nov 10 16:05:00 2019 -0800

    cherokee: Fix build when time_t is 64bit
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 ...-internal.h-Define-LLONG_MAX-if-undefined.patch | 47 ++++++++++++++++++++++
 .../recipes-httpd/cherokee/cherokee_git.bb         |  1 +
 2 files changed, 48 insertions(+)

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 0000000..0f43842
--- /dev/null
+++ b/meta-webserver/recipes-httpd/cherokee/cherokee/0001-common-internal.h-Define-LLONG_MAX-if-undefined.patch
@@ -0,0 +1,47 @@
+From c73415021f3f3b2b30062ab74b25fe49c51c2242 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Sun, 10 Nov 2019 15:59:44 -0800
+Subject: [PATCH] common-internal.h: Define LLONG_MAX if undefined
+
+time_t can also be long long type, therefore check for that as fallback
+Fixes build on 32bit hosts where time_t is fixed for Y2K38
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ cherokee/common-internal.h | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/cherokee/common-internal.h b/cherokee/common-internal.h
+index 5c28da97..5646ec0f 100644
+--- a/cherokee/common-internal.h
++++ b/cherokee/common-internal.h
+@@ -222,6 +222,16 @@ char *strcasestr(char *s, char *find);
+ # endif
+ #endif
+ 
++/* Long Long limit
++ */
++#ifndef LLONG_MAX
++# if (__SIZEOF_LONG_LONG__ == 8)
++#  define LLONG_MAX 0x7fffffffffffffffLL
++# else
++#  error "Can't define LLONG_MAX"
++# endif
++#endif
++
+ /* time_t limit
+  */
+ #ifndef TIME_MAX
+@@ -229,6 +239,8 @@ char *strcasestr(char *s, char *find);
+ #  define TIME_MAX ((time_t)INT_MAX)
+ # elif (SIZEOF_TIME_T == SIZEOF_LONG)
+ #  define TIME_MAX ((time_t)LONG_MAX)
++# elif (SIZEOF_TIME_T == __SIZEOF_LONG_LONG__)
++#  define TIME_MAX ((time_t)LLONG_MAX)
+ # else
+ #  error "Can't define TIME_MAX"
+ # endif
+-- 
+2.24.0
+
diff --git a/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb b/meta-webserver/recipes-httpd/cherokee/cherokee_git.bb
index 69d6472..490fc53 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 \
            file://cherokee-install-configured.py-once.patch \
            file://0001-configure.ac-Add-foreign-to-AM_INIT_AUTOMAKE.patch \
            file://0001-make-Do-not-build-po-files.patch \
+           file://0001-common-internal.h-Define-LLONG_MAX-if-undefined.patch \
 "
 
 S = "${WORKDIR}/git"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list