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
@@ -40,12 +40,7 @@
#include <limits.h>
#endif
#if defined(MAJOR_IN_MKDEV)
#include <sys/mkdev.h>
#elif defined(MAJOR_IN_SYSMACROS)
#include <sys/sysmacros.h>
#endif
#include <grub/osdep/major.h>
#include <libdevmapper.h>
#include <grub/types.h>