1
Subject: include semaphore.h explicitly for newer kernels
2
Origin: http://svn.asterisk.org/svn/dahdi/linux/trunk@8758
3
Bug: https://issues.asterisk.org/view.php?id=17382
5
With kernel version >= 2.6.35-rc1, building failed with:
7
drivers/dahdi/voicebus/GpakCust.h:114: error: field ‘sem’ has incomplete type
11
07-semaphore-include-not-optional.diff uploaded by Chainsaw (license 723)
14
drivers/dahdi/voicebus/GpakCust.h | 5 +++++
15
1 files changed, 5 insertions(+), 0 deletions(-)
17
diff --git a/drivers/dahdi/voicebus/GpakCust.h b/drivers/dahdi/voicebus/GpakCust.h
18
index 2b28480..64ef44a 100644
19
--- a/drivers/dahdi/voicebus/GpakCust.h
20
+++ b/drivers/dahdi/voicebus/GpakCust.h
22
#include <linux/completion.h>
23
#include <linux/workqueue.h>
24
#include <linux/delay.h>
25
+#include <linux/version.h>
27
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 25)
28
+#include <linux/semaphore.h>