bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mountlist missing sys/sysmacros.h include


From: Mike Frysinger
Subject: Re: mountlist missing sys/sysmacros.h include
Date: Wed, 9 Mar 2016 09:41:11 -0500

On 09 Mar 2016 11:18, Pádraig Brady wrote:
> On 08/03/16 02:18, Mike Frysinger wrote:
> > lib/mountlist.c assumes that sys/types.h includes sys/sysmacros.h
> > directly in order to provide makedev().  when it doesn't, things
> > fall apart like:
> > mountlist.c: In function 'read_file_system_list':
> > mountlist.c:532:26: warning: implicit declaration of function 'makedev' 
> > [-Wimplicit-function-declaration]
> >     me->me_dev = makedev (devmaj, devmin);
> > ...
> > .../libgnulib.a(mountlist.o): In function `read_file_system_list':
> > .../mountlist.c:532: undefined reference to `makedev'
> > collect2: error: ld returned 1 exit status
> >
> > configure output looks like:
> > checking sys/mkdev.h usability... no
> > checking sys/mkdev.h presence... no
> > checking for sys/mkdev.h... no
> > checking whether sys/types.h defines makedev... no
> > checking for sys/mkdev.h... (cached) no
> > checking sys/sysmacros.h usability... yes
> > checking sys/sysmacros.h presence... yes
> > checking for sys/sysmacros.h... yes
> >
> > autoconf provides a AC_HEADER_MAJOR helper specifically for this:
> >     If sys/types.h does not define major, minor, and makedev, but
> >     sys/mkdev.h does, define MAJOR_IN_MKDEV; otherwise, if
> >     sys/sysmacros.h does, define MAJOR_IN_SYSMACROS.
> >
> > lib/ptsname_r.c could probably do with a bit of cleanup in this area too.
> 
> This would be for BSD userspace on Linux kernel I suppose.

glibc is changing, and other C libs already do (like musl) or will
(like uClibc)
-mike

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]