]> Savannah Git Hosting - gnulib.git/commit
mountlist: include sysmacros.h for glibc
authorEric Blake <eblake@redhat.com>
Thu, 15 Sep 2016 00:21:42 +0000 (19:21 -0500)
committerEric Blake <eblake@redhat.com>
Thu, 15 Sep 2016 17:39:08 +0000 (12:39 -0500)
commit4da63c5881f60f71999a943612da9112232b9161
tree375b6578931c666d87c5b7ac4a55d1cb4da1c5ce
parentf215ec48b6351a99aa86188702b11396b30b90f3
mountlist: include sysmacros.h for glibc

On Fedora rawhide (glibc 2.25), './gnulib-tool --test mountlist'
reports:
../../gllib/mountlist.c: In function 'read_file_system_list':
../../gllib/mountlist.c:534:13: warning: '__makedev_from_sys_types' is deprecated:
  In the GNU C Library, `makedev' is defined by <sys/sysmacros.h>.
  For historical compatibility, it is currently defined by
  <sys/types.h> as well, but we plan to remove this soon.
  To use `makedev', include <sys/sysmacros.h> directly.
  If you did not intend to use a system-defined macro `makedev',
  you should #undef it after including <sys/types.h>.
  [-Wdeprecated-declarations]
             me->me_dev = makedev (devmaj, devmin);
             ^~
In file included from /usr/include/features.h:397:0,
                 from /usr/include/sys/types.h:25,
                 from ./sys/types.h:28,
                 from ../../gllib/mountlist.h:23,
                 from ../../gllib/mountlist.c:20:
/usr/include/sys/sysmacros.h:89:1: note: declared here
 __SYSMACROS_DEFINE_MAKEDEV (__SYSMACROS_FST_IMPL_TEMPL)
 ^

Fix it by including the right headers.  We also need a fix to
autoconf's AC_HEADER_MAJOR, but that's a separate patch.

* m4/mountlist.m4 (gl_PREREQ_MOUTLIST_EXTRA): Include
AC_HEADER_MAJOR.
* lib/mountlist.c (includes): Use correct headers.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
lib/mountlist.c
m4/mountlist.m4