qtbase: fix ifreq incomplete type on Redox — provide forward decl, skip SIOCGIFMTU MTU query
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <linux/idr.h>
|
||||
|
||||
#ifndef __iomem
|
||||
#define __iomem
|
||||
#endif
|
||||
@@ -223,8 +225,7 @@ struct device {
|
||||
|
||||
struct pci_dev {
|
||||
u16 vendor;
|
||||
u16 device;
|
||||
u16 command;
|
||||
u16 device_id;
|
||||
u8 bus_number;
|
||||
u8 dev_number;
|
||||
u8 func_number;
|
||||
@@ -234,6 +235,8 @@ struct pci_dev {
|
||||
u64 resource_len[6];
|
||||
void *driver_data;
|
||||
struct device device_obj;
|
||||
/* Red Bear extensions after the linux-kpi-compatible prefix */
|
||||
u16 command;
|
||||
bool enabled;
|
||||
int refcount;
|
||||
u32 resource_flags[6];
|
||||
@@ -503,38 +506,6 @@ static inline int list_empty(const struct list_head *head) {
|
||||
&(pos)->member != (head); \
|
||||
(pos) = list_entry((pos)->member.next, typeof(*(pos)), member))
|
||||
|
||||
/* ---- IDR ---- */
|
||||
struct idr {
|
||||
int next_id;
|
||||
};
|
||||
|
||||
#define DEFINE_IDR(name) struct idr name = { .next_id = 1 }
|
||||
|
||||
static inline int idr_alloc(struct idr *idr, void *ptr, int start, int end, int flags) {
|
||||
(void)ptr;
|
||||
(void)start;
|
||||
(void)end;
|
||||
(void)flags;
|
||||
return idr->next_id++;
|
||||
}
|
||||
|
||||
static inline void *idr_find(struct idr *idr, int id) {
|
||||
(void)idr;
|
||||
(void)id;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void idr_remove(struct idr *idr, int id) {
|
||||
(void)idr;
|
||||
(void)id;
|
||||
}
|
||||
|
||||
static inline void idr_destroy(struct idr *idr) {
|
||||
(void)idr;
|
||||
}
|
||||
|
||||
#define idr_for_each_entry(idr, entry, id) for ((id) = 0; ((entry) = idr_find((idr), (id))) != NULL; (id)++)
|
||||
|
||||
/* ---- Misc ---- */
|
||||
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||
#define BITS_PER_LONG (sizeof(long) * 8)
|
||||
|
||||
@@ -234,7 +234,7 @@ void redox_pci_set_device_info(u16 vendor, u16 device,
|
||||
{
|
||||
memset(&g_pci_dev, 0, sizeof(g_pci_dev));
|
||||
g_pci_dev.vendor = vendor;
|
||||
g_pci_dev.device = device;
|
||||
g_pci_dev.device_id = device;
|
||||
g_pci_dev.bus_number = bus_number;
|
||||
g_pci_dev.dev_number = dev_number;
|
||||
g_pci_dev.func_number = func_number;
|
||||
|
||||
Reference in New Issue
Block a user