public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/lighttpd/files/, www-servers/lighttpd/
Date: Mon,  6 May 2024 14:05:06 +0000 (UTC)	[thread overview]
Message-ID: <1715004284.3fd7c14fa60fed75db7868fb3dbd57e63cd5cda4.sam@gentoo> (raw)

commit:     3fd7c14fa60fed75db7868fb3dbd57e63cd5cda4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May  6 14:04:27 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May  6 14:04:44 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fd7c14f

www-servers/lighttpd: fix build on sparc

Closes: https://bugs.gentoo.org/931305
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../lighttpd/files/lighttpd-1.4.75-sparc.patch     | 74 ++++++++++++++++++++++
 www-servers/lighttpd/lighttpd-1.4.75.ebuild        |  4 ++
 2 files changed, 78 insertions(+)

diff --git a/www-servers/lighttpd/files/lighttpd-1.4.75-sparc.patch b/www-servers/lighttpd/files/lighttpd-1.4.75-sparc.patch
new file mode 100644
index 000000000000..d7bd72973b94
--- /dev/null
+++ b/www-servers/lighttpd/files/lighttpd-1.4.75-sparc.patch
@@ -0,0 +1,74 @@
+https://bugs.gentoo.org/931305
+https://github.com/lighttpd/lighttpd1.4/commit/524614455554163ec78b27b89ff52bbf7fe96958
+
+From 524614455554163ec78b27b89ff52bbf7fe96958 Mon Sep 17 00:00:00 2001
+From: Glenn Strauss <gstrauss@gluelogic.com>
+Date: Wed, 24 Apr 2024 03:07:37 -0400
+Subject: [PATCH] [core] special value for Linux POLLRDHUP on SPARC (fixes
+ #3251)
+
+x-ref:
+  "[1.4.76] buildroot compile error with bootlin-sparc{64-g,-uc}libc"
+  https://redmine.lighttpd.net/issues/3251
+--- a/src/fdevent.h
++++ b/src/fdevent.h
+@@ -40,6 +40,8 @@ struct fdnode_st {
+ #if (defined(__sun) && defined(__SVR4)) /* Solaris */ \
+  || defined(__FreeBSD__)
+ #define FDEVENT_RDHUP  0x4000
++#elif (defined(__linux__) && (defined(__sparc__) || defined(__sparc)))
++#define FDEVENT_RDHUP  0x2800 /*(0x2000 EPOLLRDHUP | 0x0800 POLLRDHUP)*/
+ #else
+ #define FDEVENT_RDHUP  0x2000
+ #endif
+--- a/src/fdevent_impl.c
++++ b/src/fdevent_impl.c
+@@ -338,6 +338,11 @@ fdevent_linux_sysepoll_event_set (fdevents *ev, fdnode *fdn, int events)
+     struct epoll_event ep;
+   #ifndef EPOLLRDHUP
+     events &= ~FDEVENT_RDHUP;
++  #elif (defined(__linux__) && (defined(__sparc__) || defined(__sparc)))
++    if (events & FDEVENT_RDHUP) {
++        events &= ~FDEVENT_RDHUP;
++        events |= EPOLLRDHUP;
++    }
+   #endif
+     ep.events = events | EPOLLERR | EPOLLHUP;
+     ep.data.ptr = fdn;
+@@ -376,7 +381,11 @@ fdevent_linux_sysepoll_init (fdevents *ev)
+     ck_static_assert(EPOLLERR   == FDEVENT_ERR);
+     ck_static_assert(EPOLLHUP   == FDEVENT_HUP);
+   #ifdef EPOLLRDHUP
++   #if (defined(__linux__) && (defined(__sparc__) || defined(__sparc)))
++    ck_static_assert(EPOLLRDHUP  & FDEVENT_RDHUP);
++   #else
+     ck_static_assert(EPOLLRDHUP == FDEVENT_RDHUP);
++   #endif
+   #endif
+ 
+     ev->type      = FDEVENT_HANDLER_LINUX_SYSEPOLL;
+@@ -770,6 +779,11 @@ fdevent_poll_event_set (fdevents *ev, fdnode *fdn, int events)
+ 
+   #ifndef POLLRDHUP
+     events &= ~FDEVENT_RDHUP;
++  #elif (defined(__linux__) && (defined(__sparc__) || defined(__sparc)))
++    if (events & FDEVENT_RDHUP) {
++        events &= ~FDEVENT_RDHUP;
++        events |= POLLRDHUP;
++    }
+   #endif
+ 
+     if (k >= 0) {
+@@ -854,7 +868,11 @@ fdevent_poll_init (fdevents *ev)
+     ck_static_assert(POLLHUP   == FDEVENT_HUP);
+     ck_static_assert(POLLNVAL  == FDEVENT_NVAL);
+   #ifdef POLLRDHUP
++   #if (defined(__linux__) && (defined(__sparc__) || defined(__sparc)))
++    ck_static_assert(POLLRDHUP  & FDEVENT_RDHUP);
++   #else
+     ck_static_assert(POLLRDHUP == FDEVENT_RDHUP);
++   #endif
+   #endif
+ 
+     ev->type      = FDEVENT_HANDLER_POLL;
+

diff --git a/www-servers/lighttpd/lighttpd-1.4.75.ebuild b/www-servers/lighttpd/lighttpd-1.4.75.ebuild
index 4def4402a70a..dc161bf17a69 100644
--- a/www-servers/lighttpd/lighttpd-1.4.75.ebuild
+++ b/www-servers/lighttpd/lighttpd-1.4.75.ebuild
@@ -69,6 +69,10 @@ BDEPEND="
 	verify-sig? ( sec-keys/openpgp-keys-lighttpd )
 "
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.4.75-sparc.patch
+)
+
 # update certain parts of lighttpd.conf based on conditionals
 update_config() {
 	local config="${ED}/etc/lighttpd/lighttpd.conf"


             reply	other threads:[~2024-05-06 14:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 14:05 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-14 10:47 [gentoo-commits] repo/gentoo:master commit in: www-servers/lighttpd/files/, www-servers/lighttpd/ Sam James
2024-07-12 10:29 Sam James
2024-05-06 16:34 Sam James
2023-09-08 21:05 Sam James
2021-07-03 15:46 Joonas Niilola
2019-08-02 12:04 Mikle Kolyada
2018-04-28 12:53 Mikle Kolyada

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=1715004284.3fd7c14fa60fed75db7868fb3dbd57e63cd5cda4.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox