Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/2] package/eudev: fix build with musl + libselinux
Date: Thu, 30 Jul 2015 22:59:05 +0200	[thread overview]
Message-ID: <20150730225905.5572cb98@free-electrons.com> (raw)
In-Reply-To: <1438272098-28557-2-git-send-email-romain.naour@openwide.fr>

Dear Romain Naour,

On Thu, 30 Jul 2015 18:01:38 +0200, Romain Naour wrote:

> + #ifdef HAVE_SELINUX
> ++#ifdef HAVE_MALLINFO
> +         usec_t before_timestamp, after_timestamp;

Why do you enclose the timestamp stuff inside HAVE_MALLINFO ? It is
unrelated.

> +         struct mallinfo before_mallinfo, after_mallinfo;
> ++#endif
> + 
> +         if (!mac_selinux_use())
> +                 return 0;
> +@@ -75,8 +77,10 @@ int mac_selinux_init(const char *prefix) {
> +         if (label_hnd)
> +                 return 0;
> + 
> ++#ifdef HAVE_MALLINFO
> +         before_mallinfo = mallinfo();
> +         before_timestamp = now(CLOCK_MONOTONIC);

Ditto.

> ++#endif
> + 
> +         if (prefix) {
> +                 struct selinux_opt options[] = {
> +@@ -91,6 +95,7 @@ int mac_selinux_init(const char *prefix) {
> +                 log_enforcing("Failed to initialize SELinux context: %m");
> +                 r = security_getenforce() == 1 ? -errno : 0;
> +         } else  {
> ++#ifdef HAVE_MALLINFO
> +                 char timespan[FORMAT_TIMESPAN_MAX];
> +                 int l;
> + 
> +@@ -102,6 +107,9 @@ int mac_selinux_init(const char *prefix) {
> +                 log_debug("Successfully loaded SELinux database in %s, size on heap is %iK.",
> +                           format_timespan(timespan, sizeof(timespan), after_timestamp - before_timestamp, 0),
> +                           (l+1023)/1024);
> ++#else
> ++                log_debug("Successfully loaded SELinux database");

Ditto.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-07-30 20:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 16:01 [Buildroot] [PATCH v2 1/2] package/eudev: add libselinux dependency Romain Naour
2015-07-30 16:01 ` [Buildroot] [PATCH v2 2/2] package/eudev: fix build with musl + libselinux Romain Naour
2015-07-30 20:59   ` Thomas Petazzoni [this message]
2015-07-31 13:22     ` Romain Naour
2015-07-31 13:45       ` Thomas Petazzoni
2015-07-30 21:27 ` [Buildroot] [PATCH v2 1/2] package/eudev: add libselinux dependency Thomas Petazzoni

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=20150730225905.5572cb98@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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