diff options
author | markd <markd@pkgsrc.org> | 2004-02-04 13:35:51 +0000 |
---|---|---|
committer | markd <markd@pkgsrc.org> | 2004-02-04 13:35:51 +0000 |
commit | 6fef1a95d0eb2358506a5f4b958b33b803afadc8 (patch) | |
tree | 1e493517592958f519af3aa8cefb172823e15178 /audio/arts/patches | |
parent | 40907ad07a42359640b844c46bf851f94b0ef1c1 (diff) | |
download | pkgsrc-6fef1a95d0eb2358506a5f4b958b33b803afadc8.tar.gz |
Update arts to 1.2.0. Part of KDE 3.2.
Arts specific changes unspecified.
Diffstat (limited to 'audio/arts/patches')
-rw-r--r-- | audio/arts/patches/patch-ab | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/audio/arts/patches/patch-ab b/audio/arts/patches/patch-ab index 3c5925cd21c..f87a560ee5c 100644 --- a/audio/arts/patches/patch-ab +++ b/audio/arts/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.4 2002/10/03 10:22:35 jlam Exp $ +$NetBSD: patch-ab,v 1.5 2004/02/04 13:35:52 markd Exp $ ---- artsc/artsdsp.c.orig Mon Jun 24 09:55:50 2002 +--- artsc/artsdsp.c.orig 2003-07-17 07:18:09.000000000 +1200 +++ artsc/artsdsp.c -@@ -127,6 +127,14 @@ int munmap(void *start, size_t length); +@@ -133,6 +133,14 @@ int munmap(void *start, size_t length); static void artsdsp_doinit() { @@ -17,45 +17,48 @@ $NetBSD: patch-ab,v 1.4 2002/10/03 10:22:35 jlam Exp $ const char *env; artsdsp_init = 1; -@@ -139,14 +147,29 @@ static void artsdsp_doinit() +@@ -145,15 +153,31 @@ static void artsdsp_doinit() mmapemu = env && !strcmp(env,"1"); /* resolve original symbols */ - orig_open = (orig_open_ptr)dlsym(RTLD_NEXT,"open"); - orig_close = (orig_close_ptr)dlsym(RTLD_NEXT,"close"); - orig_write = (orig_write_ptr)dlsym(RTLD_NEXT,"write"); +- orig_read = (orig_read_ptr)dlsym(RTLD_NEXT,"read"); - orig_ioctl = (orig_ioctl_ptr)dlsym(RTLD_NEXT,"ioctl"); - orig_mmap = (orig_mmap_ptr)dlsym(RTLD_NEXT,"mmap"); - orig_munmap = (orig_munmap_ptr)dlsym(RTLD_NEXT,"munmap"); - orig_fopen = (orig_fopen_ptr)dlsym(RTLD_NEXT,"fopen"); - orig_access = (orig_access_ptr)dlsym(RTLD_NEXT,"access"); +#if defined(__NetBSD__) && !defined(OPEN_SOUND_SYSTEM) -+ handle = dlopen(NULL, DL_LAZY); ++ handle = dlopen(NULL, DL_LAZY); + orig_open = (orig_open_ptr)dlsym(handle,"open"); + orig_close = (orig_close_ptr)dlsym(handle,"close"); + orig_write = (orig_write_ptr)dlsym(handle,"write"); -+ orig_ioctl = (orig_ioctl_ptr)dlsym(handle,"_oss_ioctl"); ++ orig_read = (orig_read_ptr)dlsym(handle,"read"); ++ orig_ioctl = (orig_ioctl_ptr)dlsym(handle,"ioctl"); + orig_mmap = (orig_mmap_ptr)dlsym(handle,"mmap"); + orig_munmap = (orig_munmap_ptr)dlsym(handle,"munmap"); + orig_fopen = (orig_fopen_ptr)dlsym(handle,"fopen"); + orig_access = (orig_access_ptr)dlsym(handle,"access"); -+ (void) dlclose(handle); ++ (void) dlclose(handle); +#else -+ OPEN_GLOBAL(); ++ OPEN_GLOBAL(); + orig_open = (orig_open_ptr)dlsym(handle,"open"); + orig_close = (orig_close_ptr)dlsym(handle,"close"); + orig_write = (orig_write_ptr)dlsym(handle,"write"); ++ orig_read = (orig_read_ptr)dlsym(handle,"read"); + orig_ioctl = (orig_ioctl_ptr)dlsym(handle,"ioctl"); + orig_mmap = (orig_mmap_ptr)dlsym(handle,"mmap"); + orig_munmap = (orig_munmap_ptr)dlsym(handle,"munmap"); + orig_fopen = (orig_fopen_ptr)dlsym(handle,"fopen"); + orig_access = (orig_access_ptr)dlsym(handle,"access"); -+ CLOSE_GLOBAL(); ++ CLOSE_GLOBAL(); +#endif } - static void artsdspdebug(const char *fmt,...) -@@ -231,13 +254,18 @@ int open (const char *pathname, int flag + static void +@@ -258,10 +282,15 @@ int open (const char *pathname, int flag return sndfd; } @@ -65,16 +68,13 @@ $NetBSD: patch-ab,v 1.4 2002/10/03 10:22:35 jlam Exp $ int ioctl (int fd, ioctl_request_t request, ...) +#endif { - static int channels; - static int bits; - static int speed; int space, size, latency, odelay; +#if !defined(__NetBSD__) || defined(OPEN_SOUND_SYSTEM) /* * FreeBSD needs ioctl with varargs. However I have no idea how to "forward" * the variable args ioctl to the orig_ioctl routine. So I expect the ioctl -@@ -249,6 +277,7 @@ int ioctl (int fd, ioctl_request_t reque +@@ -273,6 +302,7 @@ int ioctl (int fd, ioctl_request_t reque va_start(args,request); argp = va_arg(args, void *); va_end(args); |