commit: 2895608c5dbd056d18cd45c3826b60066b24deb0 Author: Z. Liu <zhixu.liu <AT> gmail <DOT> com> AuthorDate: Thu Apr 17 10:13:30 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun May 11 00:44:06 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2895608c
sys-apps/dnotify: fix -Wimplicit-function-declaration Closes: https://bugs.gentoo.org/870568 Thanks-to: gentoo <AT> schick.pro Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/41628 Closes: https://github.com/gentoo/gentoo/pull/41628 Signed-off-by: Sam James <sam <AT> gentoo.org> sys-apps/dnotify/dnotify-0.18.0-r1.ebuild | 6 +++- .../dnotify-0.18.0-fix-implicit-declarations.patch | 38 ++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/sys-apps/dnotify/dnotify-0.18.0-r1.ebuild b/sys-apps/dnotify/dnotify-0.18.0-r1.ebuild index b92ef1d92179..43e20482f4b7 100644 --- a/sys-apps/dnotify/dnotify-0.18.0-r1.ebuild +++ b/sys-apps/dnotify/dnotify-0.18.0-r1.ebuild @@ -1,8 +1,10 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 +inherit autotools + DESCRIPTION="Execute a command when the contents of a directory change" HOMEPAGE="https://directory.fsf.org/project/dnotify/" SRC_URI="mirror://gentoo/${P}.tar.gz" @@ -17,8 +19,10 @@ DEPEND="nls? ( sys-devel/gettext )" PATCHES=( "${FILESDIR}/${P}-nls.patch" "${FILESDIR}/${P}-glibc-212.patch" + "${FILESDIR}/${P}-fix-implicit-declarations.patch" ) src_configure() { + eautoreconf econf $(use_enable nls) } diff --git a/sys-apps/dnotify/files/dnotify-0.18.0-fix-implicit-declarations.patch b/sys-apps/dnotify/files/dnotify-0.18.0-fix-implicit-declarations.patch new file mode 100644 index 000000000000..f2b503c72bb3 --- /dev/null +++ b/sys-apps/dnotify/files/dnotify-0.18.0-fix-implicit-declarations.patch @@ -0,0 +1,38 @@ +fix error on -Wimplicit-function-declaration in configure & compile + +> conftest.c:50:14: error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] +> conftest.c:102:2: error: call to undeclared function 'wait'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] +> string.c:45:9: error: call to undeclared library function 'malloc' with type 'void *(unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + +diff '--color=auto' -urN a/configure.ac b/configure.ac +--- a/configure.ac 2004-10-18 16:09:36.000000000 -0000 ++++ b/configure.ac 2025-02-26 18:23:10.470314477 -0000 +@@ -63,6 +63,7 @@ + AC_TRY_RUN([ + #include <stdio.h> + #include <signal.h> ++#include <stdlib.h> + int main() { exit(SIGRTMIN >= 0 ? 0 : 1); } + ], [ + AC_MSG_RESULT([yes]) +@@ -94,6 +95,8 @@ + #include <fcntl.h> + #include <signal.h> + #include <unistd.h> ++#include <stdlib.h> ++#include <sys/wait.h> + + volatile int count = 0; + +diff '--color=auto' -urN a/src/string.c b/src/string.c +--- a/src/string.c 2004-10-06 05:13:30.000000000 -0000 ++++ b/src/string.c 2025-02-26 18:23:35.692315718 -0000 +@@ -22,6 +22,7 @@ + #include <stdint.h> + #include <limits.h> + #include <errno.h> ++#include <stdlib.h> + #include "dnotify.h" + #include "gettext.h" + #define _(s) gettext(s) +
