$OpenBSD: patch-libkcompactdisc_wmlib_plat_openbsd_c,v 1.1.1.1 2008/02/09 15:39:24 espie Exp $
--- libkcompactdisc/wmlib/plat_openbsd.c.orig	Sat Jan  5 01:02:05 2008
+++ libkcompactdisc/wmlib/plat_openbsd.c	Sat Feb  9 16:04:45 2008
@@ -30,6 +30,7 @@
 
 #include <errno.h>
 #include <stdio.h>
+#include <unistd.h>
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/mount.h>
@@ -53,7 +54,6 @@
 #include <sys/scsiio.h>
 #include <scsi/scsi_all.h>
 #include <scsi/cd.h>
-#include <scsi/scsi_cd.h>
 
 #include "include/wm_struct.h"
 #include "include/wm_cdtext.h"
@@ -476,5 +476,22 @@ gen_get_volume(struct wm_drive *d, int *left, int *rig
 
   return (0);
 } /* gen_get_volume() */
+
+int gen_scale_volume(int *left, int *right)
+{
+	/* Adjust the volume to make up for the CD-ROM drive's weirdness. */
+	*left = scale_volume(*left, 100);
+	*right = scale_volume(*right, 100);
+
+	return 0;
+}
+
+int gen_unscale_volume(int *left, int *right)
+{
+	*left = unscale_volume(*left, 100);
+	*right = unscale_volume(*right, 100);
+
+	return 0;
+}
 
 #endif
