linuxPackages.usbip: fix build with gcc8
This commit is contained in:
parent
84de36a0c8
commit
45d6ccea33
2 changed files with 18 additions and 0 deletions
|
@ -5,6 +5,11 @@ stdenv.mkDerivation rec {
|
|||
|
||||
src = kernel.src;
|
||||
|
||||
patches = [
|
||||
# fixes build with gcc8
|
||||
./fix-snprintf-truncation.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoconf automake libtool ];
|
||||
buildInputs = [ udev ];
|
||||
|
||||
|
|
13
pkgs/os-specific/linux/usbip/fix-snprintf-truncation.patch
Normal file
13
pkgs/os-specific/linux/usbip/fix-snprintf-truncation.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/tools/usb/usbip/libsrc/vhci_driver.c b/tools/usb/usbip/libsrc/vhci_driver.c
|
||||
index 8159fd98680b..7d6eb3e3fe1e 100644
|
||||
--- a/tools/usb/usbip/libsrc/vhci_driver.c
|
||||
+++ b/tools/usb/usbip/libsrc/vhci_driver.c
|
||||
@@ -111,7 +111,7 @@ static int parse_status(const char *value)
|
||||
static int refresh_imported_device_list(void)
|
||||
{
|
||||
const char *attr_status;
|
||||
- char status[MAX_STATUS_NAME+1] = "status";
|
||||
+ char status[MAX_STATUS_NAME+2] = "status";
|
||||
int i, ret;
|
||||
|
||||
for (i = 0; i < vhci_driver->ncontrollers; i++) {
|
Loading…
Reference in a new issue