Skip to content

Commit 510fdd2

Browse files
committed
fix api change of lib80211.h and VFS_internal since v6.13
1 parent 9dc5e5c commit 510fdd2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/include/linuxver.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,10 @@ typedef irqreturn_t(*FN_ISR) (int irq, void *dev_id, struct pt_regs *ptregs);
202202
#endif /* LINUX_VERS >= 4.11.0 */
203203

204204
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
205+
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0)
205206
#include <net/lib80211.h>
206207
#endif
208+
#endif
207209
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
208210
#include <linux/ieee80211.h>
209211
#else
@@ -978,9 +980,9 @@ static inline struct inode *file_inode(const struct file *f)
978980
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
979981
// New google android GKI not allow kernel_write/kernel_read, and use
980982
// below for temporary overcome, and waiting for get rid of that for future
981-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
983+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0))
982984
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
983-
#endif // LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
985+
#endif // LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0)
984986
#define vfs_write(fp, buf, len, pos) kernel_write(fp, buf, len, pos)
985987
#define vfs_read(fp, buf, len, pos) kernel_read(fp, buf, len, pos)
986988
int kernel_read_compat(struct file *file, loff_t offset, char *addr, unsigned long count);

0 commit comments

Comments
 (0)