linux/debian/patches/usbip-include-uninstalled-l...

28 lines
987 B
Diff

From: Ben Hutchings <ben@decadent.org.uk>
Date: Fri, 17 Oct 2014 13:55:16 +0200
Subject: usbip: Include uninstalled <linux/usbip.h>
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"