diff options
author | Brahmajit Das <brahmajit.xyz@gmail.com> | 2023-07-12 18:55:08 +0000 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2023-08-11 09:17:30 +0300 |
commit | 740ca23443e6d5818e476db09195736854f69d90 (patch) | |
tree | 8357cab74060cae69e780f3c2650fe12cef307fe /www-servers | |
parent | app-misc/broot: add 1.24.1 (diff) | |
download | gentoo-740ca23443e6d5818e476db09195736854f69d90.tar.gz gentoo-740ca23443e6d5818e476db09195736854f69d90.tar.bz2 gentoo-740ca23443e6d5818e476db09195736854f69d90.zip |
www-servers/fnord: Fix incompatible function pointer types
Closes: https://bugs.gentoo.org/887331
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/31855
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/fnord/files/fnord-1.11-clang-16-build-fix.patch | 81 | ||||
-rw-r--r-- | www-servers/fnord/fnord-1.11-r3.ebuild | 43 |
2 files changed, 124 insertions, 0 deletions
diff --git a/www-servers/fnord/files/fnord-1.11-clang-16-build-fix.patch b/www-servers/fnord/files/fnord-1.11-clang-16-build-fix.patch new file mode 100644 index 000000000000..5d841fb8879b --- /dev/null +++ b/www-servers/fnord/files/fnord-1.11-clang-16-build-fix.patch @@ -0,0 +1,81 @@ +Bug: https://bugs.gentoo.org/887331 +--- a/buffer_1.c ++++ b/buffer_1.c +@@ -2,6 +2,6 @@ + #include "buffer.h" + + char buffer_1_space[BUFFER_INSIZE]; +-static buffer it = BUFFER_INIT(write,1,buffer_1_space,sizeof buffer_1_space); ++static buffer it = BUFFER_INIT((void *)write,1,buffer_1_space,sizeof buffer_1_space); + buffer *buffer_1 = ⁢ + +--- a/buffer_2.c ++++ b/buffer_2.c +@@ -2,6 +2,6 @@ + #include "buffer.h" + + char buffer_2_space[BUFFER_INSIZE]; +-static buffer it = BUFFER_INIT(write,2,buffer_2_space,sizeof buffer_2_space); ++static buffer it = BUFFER_INIT((void *)write,2,buffer_2_space,sizeof buffer_2_space); + buffer *buffer_2 = ⁢ + +--- a/byte.h ++++ b/byte.h +@@ -1,7 +1,9 @@ + #ifndef BYTE_H + #define BYTE_H + +-#include <sys/cdefs.h> ++#ifdef __cplusplus ++extern "C" { ++#endif + + #ifndef __pure__ + #define __pure__ +@@ -36,3 +38,6 @@ void byte_zero(void* out, unsigned len); + #define byte_equal(s,n,t) (!byte_diff((s),(n),(t))) + + #endif ++#ifdef __cplusplus ++} ++#endif +--- a/scan.h ++++ b/scan.h +@@ -1,7 +1,9 @@ + #ifndef SCAN_H + #define SCAN_H + +-#include <sys/cdefs.h> ++#ifdef __cplusplus ++extern "C" { ++#endif + #ifndef __pure__ + #define __pure__ + #endif +@@ -59,3 +61,6 @@ extern unsigned int scan_charsetnskip(const char *in,const char *charset,unsigne + extern unsigned int scan_noncharsetnskip(const char *in,const char *charset,unsigned int limit) __pure__; + + #endif ++#ifdef __cplusplus ++} ++#endif +--- a/str.h ++++ b/str.h +@@ -1,7 +1,9 @@ + #ifndef STR_H + #define STR_H + +-#include <sys/cdefs.h> ++#ifdef __cplusplus ++extern "C" { ++#endif + #ifndef __pure__ + #define __pure__ + #endif +@@ -41,3 +43,6 @@ extern int str_start(const char *a,const char *b) __pure__; + #define str_equal(s,t) (!str_diff((s),(t))) + + #endif ++#ifdef __cplusplus ++} ++#endif diff --git a/www-servers/fnord/fnord-1.11-r3.ebuild b/www-servers/fnord/fnord-1.11-r3.ebuild new file mode 100644 index 000000000000..e9461de8b8f1 --- /dev/null +++ b/www-servers/fnord/fnord-1.11-r3.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Yet another small httpd" +HOMEPAGE="http://www.fefe.de/fnord/" +SRC_URI="http://www.fefe.de/fnord/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc ~riscv ~sparc ~x86" +IUSE="auth" + +RDEPEND=" + acct-group/nofiles + acct-user/fnord + acct-user/fnordlog + sys-apps/ucspi-tcp + virtual/daemontools +" + +DOCS=( TODO README README.auth SPEED CHANGES ) + +PATCHES=( + "${FILESDIR}/${PN}"-1.10-gentoo.diff + "${FILESDIR}/${PN}"-1.11-clang-16-build-fix.patch +) + +src_compile() { + # Fix for bug #45716 + use sparc && replace-sparc64-flags + use auth && append-flags -DAUTH + + emake DIET="" CC=$(tc-getCC) CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + dobin fnord-conf fnord + einstalldocs +} |