[PATCH v2] cobalt: allow to compile without __USE_LARGEFILE64

Norbert Lange nolange79 at gmail.com
Mon Apr 20 13:21:30 CEST 2020


Well, I dont think 1-2 lines of a preprocessor checks count as some
kind of intellectual work.
I wouldn't think that way if I take some pretty much known math
formula from wikipedia.

Norbert

Am So., 19. Apr. 2020 um 11:22 Uhr schrieb Jan Kiszka <jan.kiszka at siemens.com>:
>
> On 17.04.20 10:35, Norbert Lange via Xenomai wrote:
> > A header uses the off64_t which is only conditionally available,
> > causing compile failures.
> > The macro might be necessary to compile cobalt libraries,
> > but should not be needed for software depending on them.
> >
> > Signed-off-by: Norbert Lange <nolange79 at gmail.com>
> > ---
> >   include/cobalt/sys/mman.h | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/include/cobalt/sys/mman.h b/include/cobalt/sys/mman.h
> > index 1c47777a2..75a00da0c 100644
> > --- a/include/cobalt/sys/mman.h
> > +++ b/include/cobalt/sys/mman.h
> > @@ -31,8 +31,10 @@ extern "C" {
> >   COBALT_DECL(void *, mmap(void *addr, size_t length, int prot, int flags,
> >                        int fd, off_t offset));
> >
> > +#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
> >   COBALT_DECL(void *, mmap64(void *addr, size_t length, int prot, int flags,
> >                          int fd, off64_t offset));
> > +#endif
> >
> >   #ifdef __cplusplus
> >   }
> >
>
> Thanks, applied.
>
> A "From:" line in the message would be nice to avoid that the authorship
> goes to xenomai at xenomai.org.
>
> Jan
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux



More information about the Xenomai mailing list