[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mountlist missing sys/sysmacros.h include
From: |
Mike Frysinger |
Subject: |
mountlist missing sys/sysmacros.h include |
Date: |
Mon, 7 Mar 2016 21:18:31 -0500 |
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.
-mike
signature.asc
Description: Digital signature
- mountlist missing sys/sysmacros.h include,
Mike Frysinger <=