From: Romain Naour <romain.naour@openwide.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/2] package/eudev: fix build with musl + libselinux
Date: Fri, 31 Jul 2015 15:22:38 +0200 [thread overview]
Message-ID: <55BB769E.1040808@openwide.fr> (raw)
In-Reply-To: <20150730225905.5572cb98@free-electrons.com>
Hi Thomas,
Le 30/07/2015 22:59, Thomas Petazzoni a ?crit :
> 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.
That's because I enclosed the "else" content containing the full log_debug()
inside HAVE_MALLINFO...
Ok, I'll resend this one.
Best regards,
Romain
>
>> + 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
>
next prev parent reply other threads:[~2015-07-31 13:22 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
2015-07-31 13:22 ` Romain Naour [this message]
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=55BB769E.1040808@openwide.fr \
--to=romain.naour@openwide.fr \
--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 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.