Package: lsof
Version: 4.91+dfsg-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu disco ubuntu-patch
Dear Maintainer,
lsof FTBFS on linux in tests rebuilds; due to the changes in major()/minor()
macros.
In Ubuntu, the attached patch was applied to achieve the following:
* debian/patches/majorminor: Fix ftbfs due to missing major/minor macros in
tests; by including sysmacros.h where appropriate.
Thanks for considering the patch.
-- System Information:
Debian Release: buster/sid
APT prefers disco
APT policy: (500, 'disco')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.0.0-8-generic (SMP w/4 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
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 lsof-4.91+dfsg/debian/patches/majorminor
lsof-4.91+dfsg/debian/patches/majorminor
--- lsof-4.91+dfsg/debian/patches/majorminor 1969-12-31 19:00:00.000000000
-0500
+++ lsof-4.91+dfsg/debian/patches/majorminor 2019-04-09 10:32:58.000000000
-0400
@@ -0,0 +1,37 @@
+Index: lsof-4.91+dfsg/tests/LTlib.c
+===================================================================
+--- lsof-4.91+dfsg.orig/tests/LTlib.c
++++ lsof-4.91+dfsg/tests/LTlib.c
+@@ -231,26 +231,32 @@ _PROTOTYPE(static X2DEV_T x2dev,(char *x
+ */
+
+ #if !defined(major_S)
++#include <sys/sysmacros.h>
+ #define major_S major
+ #endif /* defined(major_S) */
+
+ #if !defined(minor_S)
++#include <sys/sysmacros.h>
+ #define minor_S minor
+ #endif /* defined(minor_S) */
+
+ #if !defined(unit_S)
++#include <sys/sysmacros.h>
+ #define unit_S(x) 0
+ #endif /* defined(unit_S) */
+
+ #if !defined(major_X)
++#include <sys/sysmacros.h>
+ #define major_X(dp, em) major(x2dev(dp, em))
+ #endif /* defined(major_X) */
+
+ #if !defined(minor_X)
++#include <sys/sysmacros.h>
+ #define minor_X(dp, em) minor(x2dev(dp, em))
+ #endif /* defined(minor_X) */
+
+ #if !defined(unit_X)
++#include <sys/sysmacros.h>
+ #define unit_X(dp, em) 0
+ #endif /* defined(unit_X) */
+
diff -Nru lsof-4.91+dfsg/debian/patches/series
lsof-4.91+dfsg/debian/patches/series
--- lsof-4.91+dfsg/debian/patches/series 2015-09-13 17:37:47.000000000
-0400
+++ lsof-4.91+dfsg/debian/patches/series 2019-04-09 10:52:45.000000000
-0400
@@ -3,3 +3,4 @@
tests
obsolete
preset-ccdate
+majorminor