]> git.pld-linux.org Git - packages/emu10k1-utils.git/blobdiff - emu10k1-utils-nokernel.patch
- don't use internal kernel functions (fixes build on sparc)
[packages/emu10k1-utils.git] / emu10k1-utils-nokernel.patch
diff --git a/emu10k1-utils-nokernel.patch b/emu10k1-utils-nokernel.patch
new file mode 100644 (file)
index 0000000..4a52fd7
--- /dev/null
@@ -0,0 +1,151 @@
+--- emu-tools-0.9.4/mixer/include/bitops.h.orig        1970-01-01 00:00:00.000000000 +0000
++++ emu-tools-0.9.4/mixer/include/bitops.h     2004-05-06 19:59:13.000000000 +0000
+@@ -0,0 +1,60 @@
++#ifndef _BITOPS_H
++#define _BITOPS_H
++
++/* based on linux/include/asm-generic/bitops.h by Theodore Ts'o
++   and linux/include/asm-sh/bitops.h */
++
++static __inline__ int set_bit(int nr, __u32 * addr)
++{
++      int     mask, retval;
++
++        addr += nr >> 5;
++        mask = 1 << (nr & 0x1f);
++        retval = (mask & *addr) != 0;
++        *addr |= mask;
++        return retval;
++}
++
++extern __inline__ int clear_bit(int nr, __u32 * addr)
++{
++      int     mask, retval;
++
++      addr += nr >> 5;
++      mask = 1 << (nr & 0x1f);
++      retval = (mask & *addr) != 0;
++      *addr &= ~mask;
++      return retval;
++}
++
++static __inline__ int test_bit(int nr, const __u32 * addr)
++{
++      return 1UL & ((addr[nr >> 5]) >> (nr & 31));
++}
++
++static __inline__ int test_and_set_bit(int nr, __u32 * addr)
++{
++      int     mask, retval;
++      __u32 *a = addr;
++      
++      a += nr >> 5;
++      mask = 1 << (nr & 0x1f);
++      retval = (mask & *a) != 0;
++      *a |= mask;
++      
++      return retval;
++}
++
++static __inline__ int test_and_clear_bit(int nr, __u32 * addr)
++{
++      int     mask, retval;
++      __u32 *a = addr;
++      
++      a += nr >> 5;
++      mask = 1 << (nr & 0x1f);
++      retval = (mask & *a) != 0;
++      *a &= ~mask;
++      
++      return retval;
++}
++
++#endif
+--- emu-tools-0.9.4/mixer/include/dsp.h.orig   2002-01-20 02:00:16.000000000 +0000
++++ emu-tools-0.9.4/mixer/include/dsp.h        2004-05-06 19:48:27.000000000 +0000
+@@ -26,8 +26,7 @@
+ #include <stdint.h>
+ #include <linux/types.h>
+-#include <linux/bitops.h>
+-
++#include "bitops.h"
+ #include "list.h"
+ #define DSP_NUM_INPUTS 0x20
+--- emu-tools-0.9.4/epache-0.1.4/bitops.h.orig 1970-01-01 00:00:00.000000000 +0000
++++ emu-tools-0.9.4/epache-0.1.4/bitops.h      2004-05-06 20:02:41.000000000 +0000
+@@ -0,0 +1,60 @@
++#ifndef _BITOPS_H
++#define _BITOPS_H
++
++/* based on linux/include/asm-generic/bitops.h by Theodore Ts'o
++   and linux/include/asm-sh/bitops.h */
++
++static __inline__ int set_bit(int nr, __u32 * addr)
++{
++      int     mask, retval;
++
++        addr += nr >> 5;
++        mask = 1 << (nr & 0x1f);
++        retval = (mask & *addr) != 0;
++        *addr |= mask;
++        return retval;
++}
++
++extern __inline__ int clear_bit(int nr, __u32 * addr)
++{
++      int     mask, retval;
++
++      addr += nr >> 5;
++      mask = 1 << (nr & 0x1f);
++      retval = (mask & *addr) != 0;
++      *addr &= ~mask;
++      return retval;
++}
++
++static __inline__ int test_bit(int nr, const __u32 * addr)
++{
++      return 1UL & ((addr[nr >> 5]) >> (nr & 31));
++}
++
++static __inline__ int test_and_set_bit(int nr, __u32 * addr)
++{
++      int     mask, retval;
++      __u32 *a = addr;
++      
++      a += nr >> 5;
++      mask = 1 << (nr & 0x1f);
++      retval = (mask & *a) != 0;
++      *a |= mask;
++      
++      return retval;
++}
++
++static __inline__ int test_and_clear_bit(int nr, __u32 * addr)
++{
++      int     mask, retval;
++      __u32 *a = addr;
++      
++      a += nr >> 5;
++      mask = 1 << (nr & 0x1f);
++      retval = (mask & *a) != 0;
++      *a &= ~mask;
++      
++      return retval;
++}
++
++#endif
+--- emu-tools-0.9.4/epache-0.1.4/emudsp.h.orig 2001-08-22 21:01:07.000000000 +0000
++++ emu-tools-0.9.4/epache-0.1.4/emudsp.h      2004-05-06 20:06:18.000000000 +0000
+@@ -9,9 +9,8 @@
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
+ #include <linux/soundcard.h>
+-#include <linux/bitops.h>
+-
+ #include <linux/types.h>
++#include "bitops.h"
+ #include <glib.h>
This page took 0.101187 seconds and 4 git commands to generate.