[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#787496: libdrm: FTBFS: unconditionally includes deprecated-on-Linux sysctl header



tags 787496 + patch
thanks

Hi again,

now I’ve got the bugnumber, a debdiff and a build log.

Enjoy,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg
diff -u libdrm-2.4.60/debian/changelog libdrm-2.4.60/debian/changelog
--- libdrm-2.4.60/debian/changelog
+++ libdrm-2.4.60/debian/changelog
@@ -1,3 +1,11 @@
+libdrm (2.4.60-3+x32) unreleased; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix kfreebsd patch that caused an FTBFS on Linux/x32: (Closes: #787496)
+    only include <sys/sysctl.h> if configure detects it.
+
+ -- Thorsten Glaser <t.glaser@tarent.de>  Tue, 02 Jun 2015 11:29:50 +0200
+
 libdrm (2.4.60-3) unstable; urgency=medium
 
   [ Timo Aaltonen ]
diff -u libdrm-2.4.60/debian/patches/Fix-headers-inclusion-in-xf86drmMode.c.diff libdrm-2.4.60/debian/patches/Fix-headers-inclusion-in-xf86drmMode.c.diff
--- libdrm-2.4.60/debian/patches/Fix-headers-inclusion-in-xf86drmMode.c.diff
+++ libdrm-2.4.60/debian/patches/Fix-headers-inclusion-in-xf86drmMode.c.diff
@@ -9,8 +9,22 @@
  xf86drmMode.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
 
-diff --git a/xf86drmMode.c b/xf86drmMode.c
-index 61d5e01..de37548 100644
+Updated by Thorsten “mirabilos” Glaser <t.glaser@tarent.de>
+to add autoconf check and only include <sys/sysctl.h> if it
+is detected by configure as it’s unusable on Linux/x32 (and
+others, e.g. other new architectures).
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -41,7 +41,7 @@ AC_USE_SYSTEM_EXTENSIONS
+ AC_SYS_LARGEFILE
+ AC_FUNC_ALLOCA
+ 
+-AC_CHECK_HEADERS([sys/mkdev.h])
++AC_CHECK_HEADERS([sys/mkdev.h sys/sysctl.h])
+ 
+ # Initialize libtool
+ LT_PREREQ([2.2])
 --- a/xf86drmMode.c
 +++ b/xf86drmMode.c
 @@ -32,6 +32,9 @@
@@ -26,17 +40,15 @@
-@@ -39,12 +42,9 @@
+@@ -39,11 +42,10 @@
   */
  #include <stdint.h>
  #include <sys/ioctl.h>
-+#include <sys/sysctl.h>
- #include <stdio.h>
- 
+-#include <stdio.h>
+-
 -#ifdef HAVE_CONFIG_H
 -#include "config.h"
--#endif
--
++#ifdef HAVE_SYS_SYSCTL_H
++#include <sys/sysctl.h>
+ #endif
++#include <stdio.h>
+ 
  #include "xf86drmMode.h"
  #include "xf86drm.h"
- #include <drm.h>
--- 
-2.1.4
-

Attachment: libdrm_2.4.60-3+x32_x32.build.xz
Description: application/xz


Reply to: