Skip to content

Comments

Fix: Add kernel version check for unaligned header inclusion#34

Open
KodzghlyCZ wants to merge 1 commit intoWCHSoftGroup:mainfrom
KodzghlyCZ:linux-6-12-fix
Open

Fix: Add kernel version check for unaligned header inclusion#34
KodzghlyCZ wants to merge 1 commit intoWCHSoftGroup:mainfrom
KodzghlyCZ:linux-6-12-fix

Conversation

@KodzghlyCZ
Copy link

Fix for issue #33 , driven by the answer of @MrElendig from this thread and this post.

#include <asm/byteorder.h>
#include <asm/unaligned.h>

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Recommend using >= to match with the style of the rest of the file. But other than that, LGTM.

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0))
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants