osdep: Introduce include/grub/osdep/major.h and use it

... to factor out fix for glibc 2.25 introduced in 7a5b301e3 (build: Use
AC_HEADER_MAJOR to find device macros).

Note: Once glibc 2.25 is old enough and this fix is not needed also
AC_HEADER_MAJOR in configure.ac should be removed.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Petr Vorel authored and Daniel Kiper committed 2021-07-22 15:54:15 +02:00
1 parent 70ecee1e21
commit e94b4f2327
6 files changed
+38 -25

No files matched your search

+1 -6
View File
@@ -51,12 +51,7 @@
#endif /* ! FLOPPY_MAJOR */
#endif
#include <sys/types.h>
#if defined(MAJOR_IN_MKDEV)
#include <sys/mkdev.h>
#elif defined(MAJOR_IN_SYSMACROS)
#include <sys/sysmacros.h>
#endif
#include <grub/osdep/major.h>
#if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
# include <grub/util/libzfs.h>