|
|
10a327 |
From 80628047a6cc83f82e0c410a82b8f7facd9d50f2 Mon Sep 17 00:00:00 2001
|
|
|
10a327 |
From: Eric Blake <eblake@redhat.com>
|
|
|
10a327 |
Date: Wed, 14 Sep 2016 19:21:42 -0500
|
|
|
10a327 |
Subject: [PATCH] mountlist: include sysmacros.h for glibc
|
|
|
10a327 |
|
|
|
10a327 |
On Fedora rawhide (glibc 2.25), './gnulib-tool --test mountlist'
|
|
|
10a327 |
reports:
|
|
|
10a327 |
../../gllib/mountlist.c: In function 'read_file_system_list':
|
|
|
10a327 |
../../gllib/mountlist.c:534:13: warning: '__makedev_from_sys_types' is deprecated:
|
|
|
10a327 |
In the GNU C Library, `makedev' is defined by <sys/sysmacros.h>.
|
|
|
10a327 |
For historical compatibility, it is currently defined by
|
|
|
10a327 |
<sys/types.h> as well, but we plan to remove this soon.
|
|
|
10a327 |
To use `makedev', include <sys/sysmacros.h> directly.
|
|
|
10a327 |
If you did not intend to use a system-defined macro `makedev',
|
|
|
10a327 |
you should #undef it after including <sys/types.h>.
|
|
|
10a327 |
[-Wdeprecated-declarations]
|
|
|
10a327 |
me->me_dev = makedev (devmaj, devmin);
|
|
|
10a327 |
^~
|
|
|
10a327 |
In file included from /usr/include/features.h:397:0,
|
|
|
10a327 |
from /usr/include/sys/types.h:25,
|
|
|
10a327 |
from ./sys/types.h:28,
|
|
|
10a327 |
from ../../gllib/mountlist.h:23,
|
|
|
10a327 |
from ../../gllib/mountlist.c:20:
|
|
|
10a327 |
/usr/include/sys/sysmacros.h:89:1: note: declared here
|
|
|
10a327 |
__SYSMACROS_DEFINE_MAKEDEV (__SYSMACROS_FST_IMPL_TEMPL)
|
|
|
10a327 |
^
|
|
|
10a327 |
|
|
|
10a327 |
Fix it by including the right headers. We also need a fix to
|
|
|
10a327 |
autoconf's AC_HEADER_MAJOR, but that's a separate patch.
|
|
|
10a327 |
|
|
|
10a327 |
* m4/mountlist.m4 (gl_PREREQ_MOUTLIST_EXTRA): Include
|
|
|
10a327 |
AC_HEADER_MAJOR.
|
|
|
10a327 |
* lib/mountlist.c (includes): Use correct headers.
|
|
|
10a327 |
|
|
|
10a327 |
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
10a327 |
|
|
|
10a327 |
Upstream-commit: 4da63c5881f60f71999a943612da9112232b9161
|
|
|
10a327 |
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
|
10a327 |
---
|
|
|
10a327 |
gl/lib/mountlist.c | 6 ++++++
|
|
|
10a327 |
gl/m4/mountlist.m4 | 3 ++-
|
|
|
10a327 |
2 files changed, 8 insertions(+), 1 deletion(-)
|
|
|
10a327 |
|
|
|
10a327 |
diff --git a/gl/lib/mountlist.c b/gl/lib/mountlist.c
|
|
|
10a327 |
index c3d2852..0b6f92e 100644
|
|
|
10a327 |
--- a/gl/lib/mountlist.c
|
|
|
10a327 |
+++ b/gl/lib/mountlist.c
|
|
|
10a327 |
@@ -37,6 +37,12 @@
|
|
|
10a327 |
# include <sys/param.h>
|
|
|
10a327 |
#endif
|
|
|
10a327 |
|
|
|
10a327 |
+#if MAJOR_IN_MKDEV
|
|
|
10a327 |
+# include <sys/mkdev.h>
|
|
|
10a327 |
+#elif MAJOR_IN_SYSMACROS
|
|
|
10a327 |
+# include <sys/sysmacros.h>
|
|
|
10a327 |
+#endif
|
|
|
10a327 |
+
|
|
|
10a327 |
#if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */
|
|
|
10a327 |
# if HAVE_SYS_UCRED_H
|
|
|
10a327 |
# include <grp.h> /* needed on OSF V4.0 for definition of NGROUPS,
|
|
|
10a327 |
diff --git a/gl/m4/mountlist.m4 b/gl/m4/mountlist.m4
|
|
|
10a327 |
index ec58dc8..82b2dcb 100644
|
|
|
10a327 |
--- a/gl/m4/mountlist.m4
|
|
|
10a327 |
+++ b/gl/m4/mountlist.m4
|
|
|
10a327 |
@@ -1,4 +1,4 @@
|
|
|
10a327 |
-# serial 11
|
|
|
10a327 |
+# serial 12
|
|
|
10a327 |
dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc.
|
|
|
10a327 |
dnl This file is free software; the Free Software Foundation
|
|
|
10a327 |
dnl gives unlimited permission to copy and/or distribute it,
|
|
|
10a327 |
@@ -15,5 +15,6 @@ AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA],
|
|
|
10a327 |
[
|
|
|
10a327 |
dnl Note gl_LIST_MOUNTED_FILE_SYSTEMS checks for mntent.h, not sys/mntent.h.
|
|
|
10a327 |
AC_CHECK_HEADERS([sys/mntent.h])
|
|
|
10a327 |
+ AC_HEADER_MAJOR()dnl for use of makedev ()
|
|
|
10a327 |
gl_FSTYPENAME
|
|
|
10a327 |
])
|
|
|
10a327 |
--
|
|
|
10a327 |
2.16.2
|
|
|
10a327 |
|