summaryrefslogtreecommitdiffstats
path: root/kscd/libwm/plat_sun_cdda.c
diff options
context:
space:
mode:
Diffstat (limited to 'kscd/libwm/plat_sun_cdda.c')
-rw-r--r--kscd/libwm/plat_sun_cdda.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/kscd/libwm/plat_sun_cdda.c b/kscd/libwm/plat_sun_cdda.c
index 54a7b9bb..c0ddd86e 100644
--- a/kscd/libwm/plat_sun_cdda.c
+++ b/kscd/libwm/plat_sun_cdda.c
@@ -39,6 +39,8 @@
#include <sys/ioctl.h>
#include <malloc.h>
#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
#define WM_MSG_CLASS WM_MSG_CLASS_PLATFORM
@@ -94,7 +96,7 @@ static long wmcdda_normalize(struct cdda_block *block);
* need to exit right away so the UI doesn't show the user any CDDA controls.
*/
int
-wmcdda_init(struct cdda_device* pdev, struct cdda_block *block)
+wmcdda_init(struct cdda_device* pdev)
{
struct cdrom_cdda cdda;
int i;
@@ -123,14 +125,14 @@ wmcdda_init(struct cdda_device* pdev, struct cdda_block *block)
if (ioctl(pdev->fd, CDROMCDDA, &cdda) < 0)
{
- block->status = WM_CDM_STOPPED;
+ pdev->status = WM_CDM_STOPPED;
return -1;
} else {
- block->status = WM_CDM_STOPPED;
+ pdev->status = WM_CDM_STOPPED;
return 0;
}
} else {
- block->status = WM_CDM_EJECTED;
+ pdev->status = WM_CDM_EJECTED;
return -1;
}
}
@@ -189,10 +191,10 @@ wmcdda_read(struct cdda_device* pdev, struct cdda_block *block)
struct cdrom_cdda cdda;
int blk;
unsigned char *q;
- extern int speed;
+ int speed; /* it should be extern but where exactly? */
unsigned char* rawbuf = block->buf;
- if(pdev->fd < 0 && (wmcdda_init(pdev, block) < 0)) {
+ if(pdev->fd < 0 && (wmcdda_init(pdev) < 0)) {
return -1;
}