[banshee] Fix MusicBrainz dllmap for cross-architecture support
- From: Alexander Kojevnikov <alexk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] Fix MusicBrainz dllmap for cross-architecture support
- Date: Sun, 22 Jan 2012 02:37:16 +0000 (UTC)
commit b6e023eb25b8bc8ac3c8ab28b3028a6fc4145ef2
Author: Jo Shields <directhex apebox org>
Date: Sun Jan 22 00:53:10 2012 +0000
Fix MusicBrainz dllmap for cross-architecture support
Not every platform Banshee runs on uses libc.so.6 - for example, Itanium uses
libc.so.1, and kFreeBSD (on Debian) uses libc.so.0.1.
This is actually not a big deal, because /etc/mono/config contains an explicit
Dllmap for this case, which is populated with the host platform's correct
soname at build time. For example, on Itanium:
<dllmap dll="libc" target="libc.so.6.1" os="!windows"/>
and on kFreeBSD-AMD64:
<dllmap dll="libc" target="libc.so.0.1" os="!windows"/>
You'll notice, however, that this mapping only works when the target is
"libc" - and the MusicBrainz library in Banshee targets "libc.so.6"
Changing this to "libc" fixes execution on exotic architectures without
hurting existing architectures, thanks to the mapping in /etc/mono/config
Signed-off-by: Alexander Kojevnikov <alexk gnome org>
src/Libraries/MusicBrainz/MusicBrainz/DiscLinux.cs | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/Libraries/MusicBrainz/MusicBrainz/DiscLinux.cs b/src/Libraries/MusicBrainz/MusicBrainz/DiscLinux.cs
index 391f655..2556cf6 100644
--- a/src/Libraries/MusicBrainz/MusicBrainz/DiscLinux.cs
+++ b/src/Libraries/MusicBrainz/MusicBrainz/DiscLinux.cs
@@ -37,27 +37,27 @@ namespace MusicBrainz
const int CD_FRAMES = 75;
const int XA_INTERVAL = ((60 + 90 + 2) * CD_FRAMES);
- [DllImport ("libc.so.6", CharSet = CharSet.Auto)]
+ [DllImport ("libc", CharSet = CharSet.Auto)]
static extern int open (string path, int flags);
- [DllImport ("libc.so.6")]
+ [DllImport ("libc")]
static extern int close (int fd);
- [DllImport ("libc.so.6", EntryPoint = "ioctl")]
+ [DllImport ("libc", EntryPoint = "ioctl")]
static extern int read_toc_header (int fd, int request, ref cdrom_tochdr header);
static int read_toc_header (int fd, ref cdrom_tochdr header)
{
return read_toc_header (fd, CDROMREADTOCHDR, ref header);
}
- [DllImport ("libc.so.6", EntryPoint = "ioctl")]
+ [DllImport ("libc", EntryPoint = "ioctl")]
static extern int read_multisession (int fd, int request, ref cdrom_multisession multisession);
static int read_multisession (int fd, ref cdrom_multisession multisession)
{
return read_multisession (fd, CDROMMULTISESSION, ref multisession);
}
- [DllImport ("libc.so.6", EntryPoint = "ioctl")]
+ [DllImport ("libc", EntryPoint = "ioctl")]
static extern int read_toc_entry (int fd, int request, ref cdrom_tocentry entry);
static int read_toc_entry (int fd, ref cdrom_tocentry entry)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]