parted: fix build with glibc >= 2.27
This commit is contained in:
parent
afd280afbc
commit
adab3da09c
2 changed files with 44 additions and 2 deletions
42
srcpkgs/parted/patches/fix-glibc-2.27.patch
Normal file
42
srcpkgs/parted/patches/fix-glibc-2.27.patch
Normal file
|
@ -0,0 +1,42 @@
|
|||
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
|
||||
|
||||
|
|
@ -4,14 +4,14 @@ version=3.2
|
|||
revision=5
|
||||
build_style=gnu-configure
|
||||
# parted wants off_t as 64bit type
|
||||
configure_args="ac_cv_sizeof_off_t=8 --sbindir=/usr/bin"
|
||||
configure_args="ac_cv_sizeof_off_t=8"
|
||||
hostmakedepends="pkg-config"
|
||||
makedepends="libuuid-devel libblkid-devel ncurses-devel readline-devel device-mapper-devel"
|
||||
short_desc="The GNU Parted disk partition resizing program"
|
||||
homepage="http://www.gnu.org/software/parted/"
|
||||
license="GPL-3"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
|
||||
distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
|
||||
checksum=858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4
|
||||
|
||||
libparted_package() {
|
||||
|
|
Loading…
Reference in a new issue