void-packages/srcpkgs/parted/patches/fix-glibc-2.27.patch

43 lines
1.5 KiB
Diff

From 5cb16c0474fd4b28ed58ac06fecfc76a7f1fa9fb Mon Sep 17 00:00:00 2001
From: maxice8 <thinkabit.ukim@gmail.com>
Date: Sat, 22 Sep 2018 23:08:51 -0300
Subject: [PATCH] libparted/arch/linux.c: add missing sys/sysmacros.h include
for 'minor', 'major'
otherwise fails on glibc >= 2.27 with
arch/linux.c: In function '_dm_is_part':
arch/linux.c:551:28: warning: implicit declaration of function 'major' [-Wimplicit-function-declaration]
if (!_is_dm_major (major (deps->device[0])))
^~~~~
arch/linux.c: In function '_device_probe_type':
arch/linux.c:648:44: warning: implicit declaration of function 'minor'; did you mean 'mknod'? [-Wimplicit-function-declaration]
arch_specific->minor = dev_minor = minor (dev_stat.st_rdev);
^~~~~
mknod
CCLD libparted.la
../libparted/.libs/libparted.so: undefined reference to `major'
../libparted/.libs/libparted.so: undefined reference to `minor'
collect2: error: ld returned 1 exit status
---
libparted/arch/linux.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 0f18904..a15854f 100644
--- libparted/arch/linux.c
+++ libparted/arch/linux.c
@@ -41,6 +41,7 @@
#include <sys/utsname.h> /* for uname() */
#include <scsi/scsi.h>
#include <assert.h>
+#include <sys/sysmacros.h>
#ifdef ENABLE_DEVICE_MAPPER
#include <libdevmapper.h>
#endif
--
2.19.0