unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <bofh@yhbt.net>
To: unicorn-public@yhbt.net
Subject: [PATCH 2/1] httpdate: fix build with Ruby 2.7 (at least)
Date: Mon, 5 Jun 2023 09:28:23 +0000	[thread overview]
Message-ID: <20230605092823.M649734@dcvr> (raw)
In-Reply-To: <20230605091535.296006-1-bofh@yhbt.net>

<time.h> is still required for gmtime_r(3), and not all versions
of <ruby.h> include <time.h>, already.

Fixes: a6463151bd1db5b9 (httpdate: favor gettimeofday(2) over time(2) for correctness, 2023-06-01)
 ext/unicorn_http/httpdate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ext/unicorn_http/httpdate.c b/ext/unicorn_http/httpdate.c
index 27a8f51..0faf5da 100644
--- a/ext/unicorn_http/httpdate.c
+++ b/ext/unicorn_http/httpdate.c
@@ -1,4 +1,5 @@
 #include <ruby.h>
+#include <time.h>
 #include <sys/time.h>
 #include <stdio.h>

      reply	other threads:[~2023-06-05  9:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05  9:15 [PATCH] httpdate: favor gettimeofday(2) over time(2) for correctness Eric Wong
2023-06-05  9:28 ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230605092823.M649734@dcvr \
    --to=bofh@yhbt.net \
    --cc=unicorn-public@yhbt.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).