usbip: Use the locally-installed <linux/usbip.h>

Some years back I patched the #include of <linux/usbip.h> to include
the current, uninstalled version through a relative path because the
system-installed version will normally be outdated.  We're about to
start copying the source to avoid writing autotools crap into the
source directory, which breaks this relative path.

Since we now install the UAPI headers under debian/build at the start
of the tools build, drop the patch and add that directory to the
include path.
This commit is contained in:
Ben Hutchings 2016-08-25 01:28:48 +01:00
parent 7a54b56ad5
commit 2fddcf7c7f
4 changed files with 6 additions and 30 deletions

1
debian/changelog vendored
View File

@ -21,6 +21,7 @@ linux (4.7.2-1) UNRELEASED; urgency=medium
* [armfh] udeb: Add efi-modules
* linux-kbuild: Include headers_install.sh and unifdef (Closes: #832359)
* udeb: Include cdc_ncm in nic-usb-modules (Closes: #833918)
* usbip: Use the locally-installed <linux/usbip.h>
[ Martin Michlmayr ]
* [armhf] Enable MMC_SDHCI_IPROC and HW_RANDOM_BCM2835 for BCM2835.

View File

@ -1,28 +0,0 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 17 Oct 2014 13:55:16 +0200
Subject: usbip: Include uninstalled <linux/usbip.h>
Forwarded: no
We need to include <linux/usbip.h> from the current kernel
source, not the installed linux-libc-dev. The clean way to
do this is probably to run 'make headers_install' and then
add $(top_srcdir)/usr/include to the front of the system
header list. But I don't have time to implement that right
now.
The wrong way to do it is to add include/uapi to the header
path. <linux/types.h> explicitly prevents this from working.
But we can get away with selectively including UAPI headers
without unifdef processing, so do that here.
--- a/tools/usb/usbip/libsrc/usbip_common.h
+++ b/tools/usb/usbip/libsrc/usbip_common.h
@@ -15,7 +15,7 @@
#include <syslog.h>
#include <unistd.h>
#include <linux/usb/ch9.h>
-#include <linux/usbip.h>
+#include "../../../../include/uapi/linux/usbip.h"
#ifndef USBIDS_FILE
#define USBIDS_FILE "/usr/share/hwdata/usb.ids"

View File

@ -111,7 +111,6 @@ debian/i386-686-pae-pci-set-pci-nobios-by-default.patch
# Tools bug fixes
bugfix/all/usbip-document-tcp-wrappers.patch
bugfix/all/kbuild-fix-recordmcount-dependency.patch
bugfix/all/usbip-include-uninstalled-linux-usbip-h.patch
bugfix/all/tools-perf-man-date.patch
bugfix/all/lockdep-fix-oot-build.patch
bugfix/all/lockdep-fix-soname.patch

View File

@ -5,9 +5,13 @@ srcdir := $(top_srcdir)/tools/usb/usbip
# sub-make command line.
unexport MAKEFLAGS
all: export CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
all: export CPPFLAGS := $(shell dpkg-buildflags --get CFLAGS) \
-isystem $(top_srcdir)/debian/build/build-tools/include
all: export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
all:
cd $(srcdir) && ./autogen.sh
$(shell dpkg-buildflags --export=cmdline) $(srcdir)/configure \
$(srcdir)/configure \
--prefix=/usr \
--with-tcp-wrappers \
--with-usbids-dir=/usr/share/misc \