Package: parted
Version: 3.2-21
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu cosmic ubuntu-patch

Dear Maintainer,

parted 3.2-21 FTBFS in latest test rebuild on ubuntu. major() and minor()
macros are being used without include sys/sysmacros.h, leading to undefined
symbols at linking for these macros.

In Ubuntu, the attached patch was applied to achieve the following:

  * debian/patches/sysmacros_for_major_minor.patch: include sys/sysmacros.h to
    account for the user of major() and minor() macros.


Thanks for considering the patch.


-- System Information:
Debian Release: buster/sid
  APT prefers cosmic-security
  APT policy: (500, 'cosmic-security'), (500, 'cosmic')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.18.0-7-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_CA:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru parted-3.2/debian/patches/series parted-3.2/debian/patches/series
--- parted-3.2/debian/patches/series    2018-04-09 07:15:46.000000000 -0400
+++ parted-3.2/debian/patches/series    2018-10-04 14:45:21.000000000 -0400
@@ -27,3 +27,4 @@
 libparted-dasd-add-test-cases-for-the-new-fdasd-func.patch
 fat-resize-long-path.patch
 fat-resize-retain-boot-code.patch
+sysmacros_for_major_minor.patch
diff -Nru parted-3.2/debian/patches/sysmacros_for_major_minor.patch 
parted-3.2/debian/patches/sysmacros_for_major_minor.patch
--- parted-3.2/debian/patches/sysmacros_for_major_minor.patch   1969-12-31 
19:00:00.000000000 -0500
+++ parted-3.2/debian/patches/sysmacros_for_major_minor.patch   2018-10-04 
14:55:03.000000000 -0400
@@ -0,0 +1,19 @@
+From: Mathieu Trudel-Lapierre <cypher...@ubuntu.com>
+Subject: Incldue sys/sysmacros.h for major() and minor()
+
+---
+ libparted/arch/linux.c |   51 
++++++++++++++++++++++++-------------------------
+ 1 file changed, 26 insertions(+), 25 deletions(-)
+
+Index: b/libparted/arch/linux.c
+===================================================================
+--- a/libparted/arch/linux.c
++++ b/libparted/arch/linux.c
+@@ -40,6 +40,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <sys/utsname.h>        /* for uname() */
++#include <sys/sysmacros.h>      /* for major(), minor() */
+ #include <scsi/scsi.h>
+ #include <assert.h>
+ #ifdef ENABLE_DEVICE_MAPPER

Reply via email to