[PR #257] compat: fix build with kernel 5.15.200+ #266

Open
opened 2026-10-13 21:08:07 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/257
Author: @ferris-qq
Created: 9/30/2026
Status: 🔄 Open

Base: master ← Head: compat-5.15.200-timer-delete


📝 Commits (1)

  • c4488aa compat: fix build with kernel 5.15.200+

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 src/compat/compat.h (+2 -1)

📄 Description

On vanilla 5.15.200 and later the module fails to build:

src/compat/compat.h:1293:19: error: static declaration of 'timer_delete' follows non-static declaration
include/linux/timer.h:186:12: note: previous declaration of 'timer_delete' with type 'int(struct timer_list *)'

5.15.200 includes the backport of "timers: Rename del_timer() to timer_delete()" (29d5751350cd, upstream bb663f0f3c39), so the kernel declares timer_delete() itself. This PR skips the fallback on 5.15.200+, the same way the timer_delete_sync() fallback already skips the stable kernels that got that rename.

The boundary comes from the stable tree: include/linux/timer.h declares timer_delete() in v5.15.200 but not in v5.15.199, and the backport commit is in v5.15.200 but not in v5.15.199. The existing 6.1.91 boundary checks out the same way. 5.10.y, 5.4.y and 4.19.y only got the timer_delete_sync() rename, so they keep the fallback.

Tested on x86_64 with the kernels in nixpkgs:

  • master fails on 5.15.221 with the error above;
  • this branch builds without warnings on 5.10.270, 5.15.221, 6.1.188, 6.6.157, 6.12.111, 6.18.54 and 7.2.8; on 5.10 the module still imports del_timer, so the fallback is still used there;
  • nixpkgs' amneziawg VM test (two peers, ping over the tunnel on IPv4 and IPv6) passes on 5.15.221.

I didn't build on 5.15.199 or 5.15.200 themselves; the boundary comes from the headers and the commit above.

Disclosure: written, tested and drafted with help from Claude Code (Claude Opus 5.5).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/257 **Author:** [@ferris-qq](https://github.com/ferris-qq) **Created:** 9/30/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `compat-5.15.200-timer-delete` --- ### 📝 Commits (1) - [`c4488aa`](https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/commit/c4488aab60cecf8d18a7dab0fd492ff9f77329a0) compat: fix build with kernel 5.15.200+ ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/compat/compat.h` (+2 -1) </details> ### 📄 Description On vanilla 5.15.200 and later the module fails to build: ``` src/compat/compat.h:1293:19: error: static declaration of 'timer_delete' follows non-static declaration include/linux/timer.h:186:12: note: previous declaration of 'timer_delete' with type 'int(struct timer_list *)' ``` 5.15.200 includes the backport of "timers: Rename del_timer() to timer_delete()" ([29d5751350cd](https://git.kernel.org/stable/c/29d5751350cdf6790aadbe6bd485616f3f0ba86f), upstream bb663f0f3c39), so the kernel declares `timer_delete()` itself. This PR skips the fallback on 5.15.200+, the same way the `timer_delete_sync()` fallback already skips the stable kernels that got that rename. The boundary comes from the stable tree: `include/linux/timer.h` declares `timer_delete()` in v5.15.200 but not in v5.15.199, and the backport commit is in v5.15.200 but not in v5.15.199. The existing 6.1.91 boundary checks out the same way. 5.10.y, 5.4.y and 4.19.y only got the `timer_delete_sync()` rename, so they keep the fallback. Tested on x86_64 with the kernels in nixpkgs: - master fails on 5.15.221 with the error above; - this branch builds without warnings on 5.10.270, 5.15.221, 6.1.188, 6.6.157, 6.12.111, 6.18.54 and 7.2.8; on 5.10 the module still imports `del_timer`, so the fallback is still used there; - nixpkgs' amneziawg VM test (two peers, ping over the tunnel on IPv4 and IPv6) passes on 5.15.221. I didn't build on 5.15.199 or 5.15.200 themselves; the boundary comes from the headers and the commit above. Disclosure: written, tested and drafted with help from Claude Code (Claude Opus 5.5). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-linux-kernel-module#266
No description provided.