sys-apps/daemonize: fix build w/ c23

Thanks to Robert Schultz.

Closes: https://bugs.gentoo.org/880439
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-06-15 01:04:09 +01:00
parent 2813a327c8
commit 59f6dfec38
2 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Runs a command as a Unix daemon"
HOMEPAGE="https://software.clapper.org/daemonize/"
SRC_URI="https://github.com/bmc/${PN}/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-release-${PV}"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DOCS=( {CHANGELOG,README}.md )
PATCHES=(
"${FILESDIR}"/${PN}-1.7.8-c23.patch
)
src_prepare() {
default
sed -i \
-e 's:\($(CC)\) $(CFLAGS) \(.*\.o\):\1 $(LDFLAGS) \2:' \
Makefile.in || die
}

View File

@@ -0,0 +1,14 @@
https://bugs.gentoo.org/880439#c10
--- a/getopt.c
+++ b/getopt.c
@@ -43,9 +43,9 @@
#include <stdio.h>
/* We're ANSI now; we're guaranteed to have strchr(). */
#include <string.h>
+#include <unistd.h>
#define ERR(s, c) if(x_opterr){\
- extern int write();\
char errbuf[2];\
errbuf[0] = c; errbuf[1] = '\n';\
(void) write(2, argv[0], (unsigned)strlen(argv[0]));\