Summary: | DAHLIN-00190: [patch] Failure to include semaphore.h breaks compilation with >2.6.34 kernels (2.6.35-rc0) | ||
Reporter: | Tony Vroon (chainsaw) | Labels: | |
Date Opened: | 2010-05-24 10:56:29 | Date Closed: | 2010-06-08 14:09:10 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | dahdi (the module) |
Versions: | 2.3.0 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) 07-semaphore-include-not-optional.diff | |
Description: | DAHDI relied on other headers to drag in semaphore.h, this is no longer the case since: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3142788b7967ccfd2f1813ee9e11aeb1e1cf7de2 The result is: In file included from /var/tmp/portage/net-misc/dahdi-2.3.0/work/dahdi-linux-2.3.0/drivers/dahdi/voicebus/GpakApi.c:36: /var/tmp/portage/net-misc/dahdi-2.3.0/work/dahdi-linux-2.3.0/drivers/dahdi/voicebus/GpakCust.h:114: error: field ‘sem’ has incomplete type Patching the header to include semaphore.h as it should always have done will not hurt older kernels. | ||
Comments: | By: Tzafrir Cohen (tzafrir) 2010-05-24 13:28:22 A valid issue. I rather wait until a real RC is released, though. By: Shaun Ruffell (sruffell) 2010-05-24 14:09:39 I would agree with tzafrir...also, this breaks compilation against 2.6.9. By: Tony Vroon (chainsaw) 2010-05-24 14:12:20 Okay, will make it conditional. Do we know when semaphore.h was introduced? By: Shaun Ruffell (sruffell) 2010-05-24 14:22:24 Looks like it was introduced in 2.6.26 []$ git log --pretty=oneline include/linux/semaphore.h | tail -n 1 64ac24e738823161693bf791f87adc802cf529ff Generic semaphore implementation []$ git describe --contains 64ac24e738823161693bf791f87adc802cf529ff v2.6.26-rc1~1155^2~5 By: Tony Vroon (chainsaw) 2010-06-08 11:30:21 Second patch should be fully portable. By: Digium Subversion (svnbot) 2010-06-08 14:09:09 Repository: dahdi Revision: 8758 U linux/trunk/drivers/dahdi/voicebus/GpakCust.h ------------------------------------------------------------------------ r8758 | tzafrir | 2010-06-08 14:09:09 -0500 (Tue, 08 Jun 2010) | 11 lines include semaphore.h explicitly for newer kernels With kernel version >= 2.6.35-rc1, building failed with: drivers/dahdi/voicebus/GpakCust.h:114: error: field ?\226?\128?\152sem?\226?\128?\153 has incomplete type (closes issue DAHLIN-190) Reported by: Chainsaw Patches: 07-semaphore-include-not-optional.diff uploaded by Chainsaw (license 723) ------------------------------------------------------------------------ http://svn.digium.com/view/dahdi?view=rev&revision=8758 |