$OpenBSD: patch-wmlib_plat_openbsd_c,v 1.1.1.1 2013/04/24 18:24:40 zhuk Exp $
--- wmlib/plat_openbsd.c.orig	Thu Jan 24 02:04:49 2013
+++ wmlib/plat_openbsd.c	Wed Feb 13 12:53:50 2013
@@ -22,39 +22,39 @@
  *
  * Michael Shalayeff, 7/24/96
  * Todd Pfaff, 3/20/94
+ * Vadim Zhukov, 2013
  *
  */
 
-#if defined(__OpenBSD__) || defined(__OpenBSD)
+#if defined(__OpenBSD__)
 
 
-#include <errno.h>
-#include <stdio.h>
-#include <sys/types.h>
 #include <sys/param.h>
 #include <sys/mount.h>
-#include <fcntl.h>
-#include <sys/param.h>
 #include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <sys/cdio.h>
+#include <sys/scsiio.h>
+#include <sys/time.h>
 
-#include "include/wm_config.h"
-#include "include/wm_cdrom.h"
-#include "include/wm_helpers.h"
+#include <scsi/cd.h>
+#include <scsi/scsi_all.h>
+/* #include <scsi/scsi_cd.h> */
 
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
 /* this is for glibc 2.x which defines the ust structure in ustat.h not stat.h */
 #ifdef __GLIBC__
 #include <sys/ustat.h>
 #endif
 
-#include <sys/time.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/cdio.h>
-#include <sys/scsiio.h>
-#include <scsi/scsi_all.h>
-#include <scsi/cd.h>
-#include <scsi/scsi_cd.h>
-
+#include "include/wm_config.h"
+#include "include/wm_cdrom.h"
+#include "include/wm_helpers.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
