All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Reinauer <stefan.reinauer at coresystems.de>
To: devel@acpica.org
Subject: Re: [Devel] [PATCH] Fix iasl on Mac OS X
Date: Mon, 24 May 2010 11:08:06 +0200	[thread overview]
Message-ID: <4BFA41F6.2040907@coresystems.de> (raw)
In-Reply-To: 1274690686.19283.28.camel@minggr.sh.intel.com

[-- Attachment #1: Type: text/plain, Size: 1836 bytes --]

On 5/24/10 10:44 AM, Lin Ming wrote:
>   
>> From: Stefan Reinauer <stefan.reinauer(a)coresystems.de>
>> Date: Sat, May 15, 2010 at 12:53 AM
>> Subject: [Devel] [PATCH] Fix iasl on Mac OS X
>> To: devel(a)acpica.org
>>
>>
>> Hi,
>>
>> Mac OS X does not support unnamed semaphores, which breaks iasl. The
>> attached patch tries a named semaphore in case sema_init claims that it
>> is not implemented.
>>     
> Hi,
>
> I got below error, need to add "#include <fcntl.h>" to fix it.
>
> cc -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -I../compiler   -c -o ../osunixxf.o ../osunixxf.c
> ../osunixxf.c: In function ‘AcpiOsCreateSemaphore’:
> ../osunixxf.c:543: error: ‘O_EXCL’ undeclared (first use in this function)
> ../osunixxf.c:543: error: (Each undeclared identifier is reported only once
> ../osunixxf.c:543: error: for each function it appears in.)
> ../osunixxf.c:543: error: ‘O_CREAT’ undeclared (first use in this function)
> make: *** [../osunixxf.o] Error 1
>   

Thank you for testing this. I will update the patch.
> And another warning is,
>
> ../osunixxf.o: In function `AcpiOsCreateSemaphore':
> osunixxf.c:(.text+0x518): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
>
> As gcc suggests, better to use "mkstemp".
Not sure mkstemp is appropriate here. It creates a file while what we
need is a semaphore. I will test, however, whether creating a semaphore
by overwriting that file name works as one would hope.

Stefan

-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info(a)coresystems.de  • http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866


             reply	other threads:[~2010-05-24  9:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24  9:08 Stefan Reinauer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-05-24  8:44 [Devel] [PATCH] Fix iasl on Mac OS X Lin Ming
2010-05-14 16:53 Stefan Reinauer

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=4BFA41F6.2040907@coresystems.de \
    --to=devel@acpica.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 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.