summaryrefslogtreecommitdiff
path: root/audio/mad123/patches
diff options
context:
space:
mode:
authorsbd <sbd>2012-06-28 08:18:43 +0000
committersbd <sbd>2012-06-28 08:18:43 +0000
commitb1c0aa10b1a39503765db60af65a6e6362201c2e (patch)
tree1b9d6e7fde9c1362deab96f89520ee05890d5670 /audio/mad123/patches
parentd6988f1b04b890084c4f294952b114ae5a328e94 (diff)
downloadpkgsrc-b1c0aa10b1a39503765db60af65a6e6362201c2e.tar.gz
Make a "Fix build on SunOS." patch work on Linux aswell.
Diffstat (limited to 'audio/mad123/patches')
-rw-r--r--audio/mad123/patches/patch-ab18
1 files changed, 10 insertions, 8 deletions
diff --git a/audio/mad123/patches/patch-ab b/audio/mad123/patches/patch-ab
index fab7aa2f342..d32eb100c61 100644
--- a/audio/mad123/patches/patch-ab
+++ b/audio/mad123/patches/patch-ab
@@ -1,18 +1,20 @@
-$NetBSD: patch-ab,v 1.3 2012/02/15 22:09:31 hans Exp $
+$NetBSD: patch-ab,v 1.4 2012/06/28 08:18:43 sbd Exp $
--- audio_dev.c.orig 2004-09-22 09:23:43.000000000 +0000
+++ audio_dev.c
-@@ -22,7 +22,9 @@
+@@ -22,7 +22,11 @@
#include <sys/types.h>
#include <sys/param.h>
#include <sys/fcntl.h>
+#ifndef __linux__
#include <sys/filio.h>
++#else
++#include <stdint.h>
+#endif
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/wait.h>
-@@ -35,6 +35,10 @@
+@@ -35,6 +39,10 @@
#include <unistd.h>
#include <mad.h>
@@ -23,7 +25,7 @@ $NetBSD: patch-ab,v 1.3 2012/02/15 22:09:31 hans Exp $
#include "audio_dev.h"
#if (BYTE_ORDER == BIG_ENDIAN)
-@@ -43,6 +47,10 @@
+@@ -43,6 +51,10 @@
#undef WORDS_BIGENDIAN
#endif
@@ -34,7 +36,7 @@ $NetBSD: patch-ab,v 1.3 2012/02/15 22:09:31 hans Exp $
#define PCM_BUFFSIZE ((sizeof(((struct mad_pcm *)0)->samples) / \
sizeof(mad_fixed_t)) * 2)
struct pcm_data {
-@@ -58,7 +66,7 @@ struct pcm_data {
+@@ -58,7 +70,7 @@ struct pcm_data {
#define PCM_LOW_WATER 32
struct pcm_buffer {
volatile int pb_command;
@@ -43,7 +45,7 @@ $NetBSD: patch-ab,v 1.3 2012/02/15 22:09:31 hans Exp $
int pb_rate;
int pb_nchannels;
volatile int pb_purge;
-@@ -74,7 +82,7 @@ struct audio_dev_ctx {
+@@ -74,7 +86,7 @@ struct audio_dev_ctx {
int ac_paused;
int ac_peerread;
int ac_peerwrite;
@@ -52,7 +54,7 @@ $NetBSD: patch-ab,v 1.3 2012/02/15 22:09:31 hans Exp $
void (*ac_readcallback)(void *);
void *ac_cbarg;
struct pcm_buffer *ac_pcm;
-@@ -97,8 +105,12 @@ static void audio_convert_dither(unsigne
+@@ -97,8 +109,12 @@ static void audio_convert_dither(unsigne
static const struct audio_dev_backend *audio_dev_backends[] = {
@@ -65,7 +67,7 @@ $NetBSD: patch-ab,v 1.3 2012/02/15 22:09:31 hans Exp $
#ifndef NOARTS
&audio_dev_arts,
#endif
-@@ -326,7 +338,7 @@ audio_dev_output(struct audio_dev_ctx *a
+@@ -326,7 +342,7 @@ audio_dev_output(struct audio_dev_ctx *a
pd->pd_len = len;
written /= pd->pd_nchannels;