From d157811ce1e510e61e2be093c62e2bebeb116cf6 Mon Sep 17 00:00:00 2001 From: James Knight Date: Mon, 19 Oct 2015 13:20:23 -0400 Subject: [PATCH] xdriver_xf86-video-intel: add upstream patches fixing fstat build errors Attempting to build xdriver_xf86-video-intel version 2.99.917 with udev results in compilation failures. The provided patches ([1], [2]) corrects the `implicit declaration of function 'fstat'` occurrences during the building of this driver. [1] http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=12af8a575d1518d40416f83195049157c3a062a5 [2] http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=369ceec0e4910ba2c37736a59c55c0d6c26433bf [Thomas: - add upstream link to the git commits in the patches themselves - add James SoB line inside the patches themselves - add a comment above AUTORECONF = YES to indicate why it was added] Signed-off-by: James Knight Signed-off-by: Thomas Petazzoni --- .../0001-sna-udev-fstat.patch | 61 +++++++++++++++++++ .../0002-uxa-udev-fstat.patch | 31 ++++++++++ .../xdriver_xf86-video-intel.mk | 2 + 3 files changed, 94 insertions(+) create mode 100644 package/x11r7/xdriver_xf86-video-intel/0001-sna-udev-fstat.patch create mode 100644 package/x11r7/xdriver_xf86-video-intel/0002-uxa-udev-fstat.patch diff --git a/package/x11r7/xdriver_xf86-video-intel/0001-sna-udev-fstat.patch b/package/x11r7/xdriver_xf86-video-intel/0001-sna-udev-fstat.patch new file mode 100644 index 0000000000..e4ded3aed7 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-intel/0001-sna-udev-fstat.patch @@ -0,0 +1,61 @@ +From 12af8a575d1518d40416f83195049157c3a062a5 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Tue, 24 Feb 2015 15:25:40 +0000 +Subject: sna: udev integration depends on fstat and sys/stat.h + +src/sna/sna_driver.c: In function 'sna_handle_uevents': +src/sna/sna_driver.c:759:2: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration] + +Also take the opportunity to include udev support in the configure +summary. + +Signed-off-by: Chris Wilson + +Upstream at: http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=12af8a575d1518d40416f83195049157c3a062a5 + +Signed-off-by: James Knight + +diff --git a/configure.ac b/configure.ac +index 7476e2b..de3a4b3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -197,11 +197,15 @@ AC_ARG_ENABLE(udev, + + if test "x$UDEV" != "xno"; then + PKG_CHECK_MODULES(UDEV, [libudev], [udev="yes"], [udev="no"]) ++ AC_CHECK_HEADERS([sys/stat.h], [], [udev="no"]) + if test "x$UDEV" = "xyes" -a "x$udev" != "xyes"; then + AC_MSG_ERROR([udev support requested but not found (libudev)]) + fi + if test "x$udev" = "xyes"; then + AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection]) ++ udev_msg=" yes" ++ else ++ udev_msg=" no" + fi + fi + +@@ -911,6 +915,7 @@ echo " Support for Kernel Mode Setting? $KMS" + echo " Support for legacy User Mode Setting (for i810)? $UMS" + echo " Support for Direct Rendering Infrastructure:$dri_msg" + echo " Support for Xv motion compensation (XvMC and libXvMC):$xvmc_msg" ++echo " Support for display hotplug notifications (udev):$udev_msg" + echo " Build additional tools and utilities?$tools_msg" + if test -n "$xp_msg"; then + echo " Experimental support:$xp_msg" +diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c +index 8c0d0b5..bc20ef0 100644 +--- a/src/sna/sna_driver.c ++++ b/src/sna/sna_driver.c +@@ -740,6 +740,8 @@ sna_wakeup_handler(WAKEUPHANDLER_ARGS_DECL) + } + + #if HAVE_UDEV ++#include ++ + static void + sna_handle_uevents(int fd, void *closure) + { +-- +cgit v0.10.2 + diff --git a/package/x11r7/xdriver_xf86-video-intel/0002-uxa-udev-fstat.patch b/package/x11r7/xdriver_xf86-video-intel/0002-uxa-udev-fstat.patch new file mode 100644 index 0000000000..3ab255b93f --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-intel/0002-uxa-udev-fstat.patch @@ -0,0 +1,31 @@ +From 369ceec0e4910ba2c37736a59c55c0d6c26433bf Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Tue, 24 Feb 2015 15:25:40 +0000 +Subject: uxa: udev integration depends on fstat and sys/stat.h + +src/uxa/intel_driver.c: In function 'I830HandleUEvents': +src/uxa/intel_driver.c:738:14: error: storage size of 's' isn't known +src/uxa/intel_driver.c:746:2: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration] + +Signed-off-by: Chris Wilson + +Upstream at: Signed-off-by: James Knight + +Signed-off-by: James Knight + +diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c +index c554124..6e64b8c 100644 +--- a/src/uxa/intel_driver.c ++++ b/src/uxa/intel_driver.c +@@ -728,6 +728,8 @@ intel_flush_callback(CallbackListPtr *list, + } + + #if HAVE_UDEV ++#include ++ + static void + I830HandleUEvents(int fd, void *closure) + { +-- +cgit v0.10.2 + diff --git a/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk b/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk index 707cedd3d0..f0b075373b 100644 --- a/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk +++ b/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk @@ -9,6 +9,8 @@ XDRIVER_XF86_VIDEO_INTEL_SOURCE = xf86-video-intel-$(XDRIVER_XF86_VIDEO_INTEL_VE XDRIVER_XF86_VIDEO_INTEL_SITE = http://xorg.freedesktop.org/releases/individual/driver XDRIVER_XF86_VIDEO_INTEL_LICENSE = MIT XDRIVER_XF86_VIDEO_INTEL_LICENSE_FILES = COPYING +# We're patching configure.ac +XDRIVER_XF86_VIDEO_INTEL_AUTORECONF = YES # this fixes a getline-related compilation error in src/sna/kgem.c XDRIVER_XF86_VIDEO_INTEL_CONF_ENV = \ -- 2.30.2