All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: buildroot@buildroot.org
Cc: "Fabrice Fontaine" <fontaine.fabrice@gmail.com>,
	"Michał Łyszczek" <michal.lyszczek@bofc.pl>
Subject: [Buildroot] [PATCH 1/1] package/openrc: fix uclibc build
Date: Mon, 27 Nov 2023 22:31:38 +0100	[thread overview]
Message-ID: <20231127213138.1062051-1-fontaine.fabrice@gmail.com> (raw)

Fix the following uclibc build failures raised since bump to version
0.51 in commit 730c90faa3ec13ee1ead47113c9c5c7d3a8dac55:

../src/rc-abort/rc-abort.c: In function 'main':
../src/rc-abort/rc-abort.c:27:21: error: implicit declaration of function 'kill'; did you mean 'killpg'? [-Werror=implicit-function-declaration]
   27 |                 if (kill(pid, SIGUSR1) != 0)
      |                     ^~~~
      |                     killpg

../src/libeinfo/libeinfo.c: In function 'colour_terminal':
../src/libeinfo/libeinfo.c:319:26: error: implicit declaration of function 'fileno' [-Werror=implicit-function-declaration]
  319 |         if (f && !isatty(fileno(f)))
      |                          ^~~~~~

../src/librc/librc-misc.c: In function 'rc_getfile':
../src/librc/librc-misc.c:79:14: error: implicit declaration of function 'fileno'; did you mean 'd_fileno'? [-Werror=implicit-function-declaration]
   79 |         fd = fileno(fp);
      |              ^~~~~~
      |              d_fileno

../src/librc/librc-daemon.c: In function 'rc_service_daemons_crashed':
../src/librc/librc-daemon.c:633:37: error: implicit declaration of function 'kill'; did you mean 'killpg'? [-Werror=implicit-function-declaration]
  633 |                                 if (kill(pid, 0) == -1 && errno == ESRCH)
      |                                     ^~~~
      |                                     killpg

Fixes:
 - http://autobuild.buildroot.org/results/494ef392a971ddb3c5c7b01e0149c6439018dbe7

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../0008-meson.build-fix-uclibc-build.patch   | 53 +++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 package/openrc/0008-meson.build-fix-uclibc-build.patch

diff --git a/package/openrc/0008-meson.build-fix-uclibc-build.patch b/package/openrc/0008-meson.build-fix-uclibc-build.patch
new file mode 100644
index 0000000000..b01cb5f894
--- /dev/null
+++ b/package/openrc/0008-meson.build-fix-uclibc-build.patch
@@ -0,0 +1,53 @@
+From ce1f18ca178186821c812e0e965edd984557fed1 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 27 Nov 2023 22:22:56 +0100
+Subject: [PATCH] meson.build: fix uclibc build
+
+Fix the following uclibc build failures raised with meson because kill
+and fileno are not standard functions:
+
+../src/rc-abort/rc-abort.c: In function 'main':
+../src/rc-abort/rc-abort.c:27:21: error: implicit declaration of function 'kill'; did you mean 'killpg'? [-Werror=implicit-function-declaration]
+   27 |                 if (kill(pid, SIGUSR1) != 0)
+      |                     ^~~~
+      |                     killpg
+
+../src/libeinfo/libeinfo.c: In function 'colour_terminal':
+../src/libeinfo/libeinfo.c:319:26: error: implicit declaration of function 'fileno' [-Werror=implicit-function-declaration]
+  319 |         if (f && !isatty(fileno(f)))
+      |                          ^~~~~~
+
+../src/librc/librc-misc.c: In function 'rc_getfile':
+../src/librc/librc-misc.c:79:14: error: implicit declaration of function 'fileno'; did you mean 'd_fileno'? [-Werror=implicit-function-declaration]
+   79 |         fd = fileno(fp);
+      |              ^~~~~~
+      |              d_fileno
+
+../src/librc/librc-daemon.c: In function 'rc_service_daemons_crashed':
+../src/librc/librc-daemon.c:633:37: error: implicit declaration of function 'kill'; did you mean 'killpg'? [-Werror=implicit-function-declaration]
+  633 |                                 if (kill(pid, 0) == -1 && errno == ESRCH)
+      |                                     ^~~~
+      |                                     killpg
+
+Fixes:
+ - http://autobuild.buildroot.org/results/494ef392a971ddb3c5c7b01e0149c6439018dbe7
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream: https://github.com/OpenRC/openrc/pull/674
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 9f4fc5ee5..9ab293c3a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -149,7 +149,7 @@ else
+ endif
+ 
+ if os == 'Linux' or os == 'GNU-kFreeBSD'
+-  cc_os_flags = ['-D_DEFAULT_SOURCE']
++  cc_os_flags = ['-D_DEFAULT_SOURCE', '-D_GNU_SOURCE']
+ elif os == 'FreeBSD'
+   cc_os_flags = ['-D_BSD_SOURCE']
+ elif os == 'GNU'
-- 
2.42.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2023-11-27 21:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27 21:31 Fabrice Fontaine [this message]
2023-11-28 16:16 ` [Buildroot] [PATCH 1/1] package/openrc: fix uclibc build Yann E. MORIN

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=20231127213138.1062051-1-fontaine.fabrice@gmail.com \
    --to=fontaine.fabrice@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=michal.lyszczek@bofc.pl \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.