all: Fix compilation when u_int*_t are not defined and used by usb.h
This commit is contained in:
1 parent
6ec64f4992
commit
7522a9fbc7
4 files changed
+13
-12
No files matched your search
@@ -22,8 +22,6 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <usb.h>
|
||||
|
||||
#include "global.h"
|
||||
#include "cold-flash.h"
|
||||
#include "image.h"
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <usb.h>
|
||||
|
||||
#include "nolo.h"
|
||||
#include "image.h"
|
||||
#include "global.h"
|
||||
|
||||
+6
-8
@@ -31,14 +31,6 @@
|
||||
#include <signal.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include <usb.h>
|
||||
|
||||
#ifdef __linux__
|
||||
#ifdef LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "global.h"
|
||||
#include "device.h"
|
||||
#include "usb-device.h"
|
||||
@@ -47,6 +39,12 @@
|
||||
#include "cold-flash.h"
|
||||
#include "mkii.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#ifdef LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static struct usb_flash_device usb_devices[] = {
|
||||
{ 0x0421, 0x0096, -1, -1, -1, FLASH_DISK, { DEVICE_RX_44, 0 } },
|
||||
{ 0x0421, 0x0105, 2, 1, -1, FLASH_NOLO, { DEVICE_SU_18, DEVICE_RX_44, DEVICE_RX_48, DEVICE_RX_51, DEVICE_RM_680, 0 } },
|
||||
|
||||
@@ -20,6 +20,13 @@
|
||||
#ifndef USB_DEVICE_H
|
||||
#define USB_DEVICE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* u_int*_t types are not defined without _GNU_SOURCE but usb.h needs them */
|
||||
#define u_int8_t uint8_t
|
||||
#define u_int16_t uint16_t
|
||||
#define u_int32_t uint32_t
|
||||
|
||||
#include <usb.h>
|
||||
|
||||
#define USB_READ_EP (USB_ENDPOINT_IN | 0x1)
|
||||
|
||||
Reference in new issue
Block a user