All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Hagen.Langbartels@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] Undefined reference to Posix shm_* with uClibc
Date: Wed, 09 Dec 2009 19:32:11 +0100	[thread overview]
Message-ID: <4B1FED2B.6000607@domain.hid> (raw)
In-Reply-To: <OFD063D933.7A634F4F-ONC1257685.0047F2EE-C1257685.004B47A1@domain.hid>

Hagen.Langbartels@domain.hid wrote:
> Hi all,
> 
> I tried to compile Xenomai 2.5rc4 with uClibc 0.9.30.1 and ran into some 
> problems with references to the 
> posix functions shm_open and shm_unlink in /src/skins/posix/wrappers.c, 
> which do not exist in uClibc.
> 
> Unlinke in  /src/skins/posix/shm.c the existence of these functions is not 
> verfied (via #ifdef HAVE_SHM_*)
> and the build fails.
> 
> The following patch is a quick and dirty fix for this problem. I hope this 
> might be helpful.
> 

Actually, it looks clean to me. Can you provide it with the formal
signed-off, proper title and short description (as recent commits look
like in Xenomai)?

Jan

> 
> diff -Nur xenomai-2.4.93.orig/src/skins/posix/wrappers.c 
> xenomai-2.4.93.work/src/skins/posix/wrappers.c
> --- xenomai-2.4.93.orig/src/skins/posix/wrappers.c      2009-03-30 
> 12:24:50.000000000 +0200
> +++ xenomai-2.4.93.work/src/skins/posix/wrappers.c      2009-12-07 
> 14:22:03.983876500 +0100
> @@ -245,17 +245,21 @@
>  }
>  
>  /* shm */
> +#ifdef HAVE_SHM_OPEN
>  __attribute__ ((weak))
>  int __real_shm_open(const char *name, int oflag, mode_t mode)
>  {
>         return shm_open(name, oflag, mode);
>  }
> +#endif
>  
> +#ifdef HAVE_SHM_UNLINK
>  __attribute__ ((weak))
>  int __real_shm_unlink(const char *name)
>  {
>         return shm_unlink(name);
>  }
> +#endif
>  
>  __attribute__ ((weak))
>  int __real_ftruncate(int fildes, long length)
> 
> 
> 
> 
> Best regards,
> Hagen Langbartels
> 
> SIEB & MEYER AG
> Dipl.-Inf. (FH) Hagen Langbartels
> 
> Auf dem Schmaarkamp 21
> 21339 Lüneburg
> Germany
> Tel.: +49-4131-203-1133
> Fax.: +49-4131-38562
> E-mail: development@domain.hid
> www.sieb-meyer.de
> 
> Vorstand: Markus Meyer, Torsten Blankenburg
> Aufsichtsratsvorsitzender: Hans Reinen
> Amtsgericht Lüneburg: HRB 1805
> Umsatzsteuer-ID.-Nr.: DE 116085664
> 
> 

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux


      reply	other threads:[~2009-12-09 18:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07 13:42 [Xenomai-core] Undefined reference to Posix shm_* with uClibc Hagen.Langbartels
2009-12-09 18:32 ` Jan Kiszka [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=4B1FED2B.6000607@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=Hagen.Langbartels@domain.hid \
    --cc=xenomai@xenomai.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.