Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jörg Krause" <joerg.krause@embedded.rocks>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/upmpdcli: Add patch to fix OPEN_MAX build error
Date: Sun, 19 Jul 2015 08:44:35 +0200	[thread overview]
Message-ID: <1437288275.12715.5.camel@embedded.rocks> (raw)
In-Reply-To: <20150718143642.7ae447e3@free-electrons.com>

Dear Thomas Petazzoni,

On Sa, 2015-07-18 at 14:36 +0200, Thomas Petazzoni wrote:
> Dear J?rg Krause,
> 
> On Thu, 16 Jul 2015 22:53:12 +0200, J?rg Krause wrote:
> 
> > ++#ifndef OPEN_MAX
> > ++#define OPEN_MAX 256 /* Guess */
> > ++#endif
> > ++
> 
> This is not the right fix. There is some Linux-specific code in
> closefrom.cpp, but it doesn't get used since when you build C++ code
> with -std=c++0x, the compiler doesn't define "linux" or "__linux", 
> but
> "__linux__", so the following test doesn't work anymore:
> 
> #elif (defined(linux) || defined(__linux))
> 
> See what the compiler does, without -std=c++0x:
> 
> $ ./output/host/usr/bin/powerpc-linux-g++ -dM -E - < /dev/null | grep 
> -i linux#define __linux 1
> #define __linux__ 1
> #define __gnu_linux__ 1
> #define linux 1
> 
> And now, with -std=c++0x:
> 
> $ ./output/host/usr/bin/powerpc-linux-g++ -std=c++0x -dM -E - < 
> /dev/null | grep -i linux
> #define __linux__ 1
> #define __gnu_linux__ 1
> 
> So, just change the closefrom.cpp Linux test to:
> 
> #elif (defined(linux) || defined(__linux) || defined(__linux__))
> 
> and it will build fine, and be a lot better than a guessed 256 value.
> Can you submit a new patch that does this, and report the proper
> solution upstream?

I see! You're right, it works. I'll submit a new patch.

Best regards
J?rg Krause

      reply	other threads:[~2015-07-19  6:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16 20:53 [Buildroot] [PATCH 1/1] package/upmpdcli: Add patch to fix OPEN_MAX build error Jörg Krause
2015-07-18 12:36 ` Thomas Petazzoni
2015-07-19  6:44   ` Jörg Krause [this message]

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=1437288275.12715.5.camel@embedded.rocks \
    --to=joerg.krause@embedded.rocks \
    --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