Kernel versions

This commit is contained in:
Vadim Vetrov
2024-09-01 23:14:22 +03:00
parent 5eeff9bc0d
commit b20f15086e
3 changed files with 2 additions and 4 deletions

View File

@@ -91,7 +91,7 @@ typedef __u64 uint64_t;
* Use NETBUF_CHECK to check that buffer was properly allocated.
*/
#ifdef KERNEL_SPACE
#include <linux/gfp_types.h>
#include <linux/gfp.h>
#define NETBUF_ALLOC(buf, buf_len) __u8* buf = kmalloc(buf_len, GFP_ATOMIC);
#define NETBUF_CHECK(buf) ((buf) != NULL)
#define NETBUF_FREE(buf) kfree(buf);