laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/dahdi-linux/+/33181 )
Change subject: kernel 6.4 API change in DEFINE_SEMAPHORE ......................................................................
kernel 6.4 API change in DEFINE_SEMAPHORE
This works around build failures with kernel >= v6.4-rc1 where the DEFINE_SEMAPHORE macro is adjusted in upstream kernel commit 48380368dec14859723b9e3fbd43e042638d9a76
Change-Id: I752c903c8a0345af6e51a996d064c9d629578ab4 --- M include/dahdi/kernel.h 1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/81/33181/1
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 778c2b2..08375f2 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -1551,10 +1551,16 @@ #define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED #endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) #ifndef DEFINE_SEMAPHORE #define DEFINE_SEMAPHORE(name) \ struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) #endif +#else /* 6.4.0, speficcally 48380368dec14859723b9e3fbd43e042638d9a76 */ +#undef DEFINE_SEMAPHORE +#define DEFINE_SEMAPHORE(name) \ + struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) +#endif
#ifndef DEFINE_MUTEX struct mutex {