From: "Matthew Smith" <matthew@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/erlang/files/, dev-lang/erlang/
Date: Fri, 25 Nov 2022 08:56:18 +0000 (UTC) [thread overview]
Message-ID: <1669366539.869d0680c8ba57ccd34fc5dfedce5960c7fea070.matthew@gentoo> (raw)
commit: 869d0680c8ba57ccd34fc5dfedce5960c7fea070
Author: Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 25 08:41:52 2022 +0000
Commit: Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Fri Nov 25 08:55:39 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=869d0680
dev-lang/erlang: fix configure breakage with clang-16
Closes: https://bugs.gentoo.org/882887
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>
...rlang-25.0.4.ebuild => erlang-25.0.4-r1.ebuild} | 1 +
...rlang-25.1.1.ebuild => erlang-25.1.1-r1.ebuild} | 1 +
...rlang-25.1.2.ebuild => erlang-25.1.2-r1.ebuild} | 1 +
dev-lang/erlang/files/erlang-25.1.2-c99.patch | 101 +++++++++++++++++++++
4 files changed, 104 insertions(+)
diff --git a/dev-lang/erlang/erlang-25.0.4.ebuild b/dev-lang/erlang/erlang-25.0.4-r1.ebuild
similarity index 98%
rename from dev-lang/erlang/erlang-25.0.4.ebuild
rename to dev-lang/erlang/erlang-25.0.4-r1.ebuild
index cfab5952952b..59e41501cabd 100644
--- a/dev-lang/erlang/erlang-25.0.4.ebuild
+++ b/dev-lang/erlang/erlang-25.0.4-r1.ebuild
@@ -47,6 +47,7 @@ S="${WORKDIR}/otp-OTP-${PV}"
PATCHES=(
"${FILESDIR}"/${PN}-22.0-dont-ignore-LDFLAGS.patch
"${FILESDIR}"/${PN}-24.0.2-serial-configure.patch
+ "${FILESDIR}"/${PN}-25.1.2-c99.patch # Bug #882887
)
SITEFILE=50"${PN}"-gentoo.el
diff --git a/dev-lang/erlang/erlang-25.1.1.ebuild b/dev-lang/erlang/erlang-25.1.1-r1.ebuild
similarity index 98%
rename from dev-lang/erlang/erlang-25.1.1.ebuild
rename to dev-lang/erlang/erlang-25.1.1-r1.ebuild
index de9c4088ead3..3b06f87886f2 100644
--- a/dev-lang/erlang/erlang-25.1.1.ebuild
+++ b/dev-lang/erlang/erlang-25.1.1-r1.ebuild
@@ -47,6 +47,7 @@ S="${WORKDIR}/otp-OTP-${PV}"
PATCHES=(
"${FILESDIR}"/${PN}-22.0-dont-ignore-LDFLAGS.patch
"${FILESDIR}"/${PN}-24.0.2-serial-configure.patch
+ "${FILESDIR}"/${PN}-25.1.2-c99.patch # Bug #882887
)
SITEFILE=50"${PN}"-gentoo.el
diff --git a/dev-lang/erlang/erlang-25.1.2.ebuild b/dev-lang/erlang/erlang-25.1.2-r1.ebuild
similarity index 98%
rename from dev-lang/erlang/erlang-25.1.2.ebuild
rename to dev-lang/erlang/erlang-25.1.2-r1.ebuild
index ed72f4f42e78..eba295d5cdbc 100644
--- a/dev-lang/erlang/erlang-25.1.2.ebuild
+++ b/dev-lang/erlang/erlang-25.1.2-r1.ebuild
@@ -47,6 +47,7 @@ S="${WORKDIR}/otp-OTP-${PV}"
PATCHES=(
"${FILESDIR}"/${PN}-22.0-dont-ignore-LDFLAGS.patch
"${FILESDIR}"/${PN}-24.0.2-serial-configure.patch
+ "${FILESDIR}"/${PN}-25.1.2-c99.patch # Bug #882887
)
SITEFILE=50"${PN}"-gentoo.el
diff --git a/dev-lang/erlang/files/erlang-25.1.2-c99.patch b/dev-lang/erlang/files/erlang-25.1.2-c99.patch
new file mode 100644
index 000000000000..bc8ffdaace6c
--- /dev/null
+++ b/dev-lang/erlang/files/erlang-25.1.2-c99.patch
@@ -0,0 +1,101 @@
+Bug: https://bugs.gentoo.org/882887
+From: https://github.com/erlang/otp/pull/6504
+From: Florian Weimer <fweimer@redhat.com>
+Date: Thu, 24 Nov 2022 11:57:49 +0100
+Subject: [PATCH 1/2] configure.ac: C99 fix for
+ ERTS___AFTER_MORECORE_HOOK_CAN_TRACK_MALLOC
+
+#include <unistd.h> for the sbrk function if the header is available.
+--- a/erts/configure
++++ b/erts/configure
+@@ -20752,6 +20752,9 @@ else $as_nop
+ #ifdef HAVE_MALLOC_H
+ # include <malloc.h>
+ #endif
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
++#endif
+ #if defined(HAVE_END_SYMBOL)
+ extern char end;
+ #elif defined(HAVE__END_SYMBOL)
+--- a/erts/configure.ac
++++ b/erts/configure.ac
+@@ -2436,6 +2436,9 @@ AC_CACHE_CHECK([if __after_morecore_hook can track malloc()s core memory use],
+ #ifdef HAVE_MALLOC_H
+ # include <malloc.h>
+ #endif
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
++#endif
+ #if defined(HAVE_END_SYMBOL)
+ extern char end;
+ #elif defined(HAVE__END_SYMBOL)
+
+From 7b720d2bb9e742110ff90ec2495747b2c477e2c7 Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Thu, 24 Nov 2022 11:59:22 +0100
+Subject: [PATCH 2/2] configure.ac: C99 fixes for poll_works check
+
+Include <fcntl.h> if it is available for the open prototype.
+Return from main instead of calling exit, so that no function
+declaration is needed.
+--- a/erts/configure
++++ b/erts/configure
+@@ -24663,10 +24663,13 @@ else $as_nop
+ /* end confdefs.h. */
+
+ #include <poll.h>
+-main()
++#ifdef HAVE_FCNTL_H
++#include <fcntl.h>
++#endif
++int main()
+ {
+ #ifdef _POLL_EMUL_H_
+- exit(1); /* Implemented using select() -- fail */
++ return 1; /* Implemented using select() -- fail */
+ #else
+ struct pollfd fds[1];
+ int fd;
+@@ -24675,9 +24678,9 @@ main()
+ fds[0].events = POLLIN;
+ fds[0].revents = 0;
+ if (poll(fds, 1, 0) < 0 || (fds[0].revents & POLLNVAL) != 0) {
+- exit(1); /* Does not work for devices -- fail */
++ return 1; /* Does not work for devices -- fail */
+ }
+- exit(0);
++ return 0;
+ #endif
+ }
+
+--- a/erts/configure.ac
++++ b/erts/configure.ac
+@@ -3036,10 +3036,13 @@ poll_works=no
+
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <poll.h>
+-main()
++#ifdef HAVE_FCNTL_H
++#include <fcntl.h>
++#endif
++int main()
+ {
+ #ifdef _POLL_EMUL_H_
+- exit(1); /* Implemented using select() -- fail */
++ return 1; /* Implemented using select() -- fail */
+ #else
+ struct pollfd fds[1];
+ int fd;
+@@ -3048,9 +3051,9 @@ main()
+ fds[0].events = POLLIN;
+ fds[0].revents = 0;
+ if (poll(fds, 1, 0) < 0 || (fds[0].revents & POLLNVAL) != 0) {
+- exit(1); /* Does not work for devices -- fail */
++ return 1; /* Does not work for devices -- fail */
+ }
+- exit(0);
++ return 0;
+ #endif
+ }
+ ]])],[poll_works=yes],[poll_works=no],[
next reply other threads:[~2022-11-25 8:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 8:56 Matthew Smith [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-05-21 11:45 [gentoo-commits] repo/gentoo:master commit in: dev-lang/erlang/files/, dev-lang/erlang/ Matthew Smith
2022-07-09 8:32 Sam James
2021-07-05 7:49 Sergei Trofimovich
2020-11-07 10:29 Sergei Trofimovich
2019-11-22 13:59 Sergei Trofimovich
2019-10-10 5:38 Joonas Niilola
2019-06-04 17:24 Anthony G. Basile
2018-10-22 10:38 Jeroen Roovers
2018-08-07 0:25 Steve Arnold
2018-01-21 11:20 Sergei Trofimovich
2016-01-09 15:05 Dirkjan Ochtman
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=1669366539.869d0680c8ba57ccd34fc5dfedce5960c7fea070.matthew@gentoo \
--to=matthew@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