Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 351464 - net-misc/dahdi-2.4.0 fails to compile against 2.6.37 kernel
Summary: net-misc/dahdi-2.4.0 fails to compile against 2.6.37 kernel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High major
Assignee: Tony Vroon (RETIRED)
URL: https://issues.asterisk.org/view.php?...
Whiteboard:
Keywords:
: 352985 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-12 18:55 UTC by Jaco Kroon
Modified: 2011-04-21 14:09 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dahdi-2.4.0-semaphores.patch (dahdi-2.4.0-semaphores.patch,2.79 KB, patch)
2011-01-12 19:50 UTC, Jaco Kroon
Details | Diff
dahdi-2.4.0-linux-2.6.37-unlocked.patch (dahdi-2.4.0-linux-2.6.37-unlocked.patch,1.81 KB, patch)
2011-01-12 19:52 UTC, Jaco Kroon
Details | Diff
dahdi-2.4.0-linux-2.6.37-unlocked-global_dialparams_lock.patch (dahdi-2.4.0-linux-2.6.37-unlocked-global_dialparams_lock.patch,3.20 KB, patch)
2011-01-24 09:05 UTC, Jaco Kroon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaco Kroon 2011-01-12 18:55:41 UTC
When running a 2.6.37 without CONFIG_BKL dahdi 2.4.0 fails to compile.  The referenced URL contains two possible patches to fix the issue, as explained, I think the -nolocked patch should be OK but there may well be reason to rather use the -locked patch instead.  The only difference is that -locked uses a mutex to protect concurrent access to the ioctl instead of the BKL, -unlocked just cleans up some code in order to get rid of the [un]lock_kernel calls.

Reproducible: Always
Comment 1 Jaco Kroon 2011-01-12 19:50:50 UTC
Created attachment 259640 [details, diff]
dahdi-2.4.0-semaphores.patch

The mutex stuff in the kernel is no longer implemented as semaphores (not that I have a clue as to the exact difference to be honest).  This required a few additional changes, this patch was built on an unpacked dahdi-2.4.0 package, I don't know what of this needs to go upstream and what not.

Also, it might break the build for <2.6.37 as from memory I think DEFINE_SEMAPHORE was previously DECLARE_MUTEX _or_ DECLARE_SEMAPHORE (identical macros) but not DEFINE_SEMAPHORE (which is the more accurate name anyway).
Comment 2 Jaco Kroon 2011-01-12 19:52:11 UTC
Created attachment 259643 [details, diff]
dahdi-2.4.0-linux-2.6.37-unlocked.patch

Attaching the recommended patch for dealing with the BKL.
Comment 3 Jaco Kroon 2011-01-24 09:05:33 UTC
Created attachment 260576 [details, diff]
dahdi-2.4.0-linux-2.6.37-unlocked-global_dialparams_lock.patch

As my plain unlocked patch got shot down upstream I made the suggested modifications and this is the retry.  This complies with the requests that sruffell made and should get accepted upstream (into trunk though).
Comment 4 Jaco Kroon 2011-02-09 12:28:28 UTC
Tony - is there anything holding this back still?

Getting tired of ebuild unpack prepare ... patch ... compile merge cycle.
Comment 5 Han Boetes 2011-02-09 13:50:33 UTC
Yes, please commit this or something even better.
Comment 6 Tony Vroon (RETIRED) gentoo-dev 2011-03-18 16:38:31 UTC
*** Bug 352985 has been marked as a duplicate of this bug. ***
Comment 7 Tony Vroon (RETIRED) gentoo-dev 2011-04-21 14:09:38 UTC
Version 2.4.1 in the tree should cope with this scenario; thank you for submitting your fix upstream.