[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
yds.c fails to compile with AUDIO_DEBUG defined
- To: bugs_(_at_)_openbsd_(_dot_)_org
- Subject: yds.c fails to compile with AUDIO_DEBUG defined
- From: Dan Weeks <danimal_(_at_)_danimal_(_dot_)_org>
- Date: Thu, 06 Dec 2001 22:50:19 -0500 (EST)
- Organization: danimal.org
While working to see what it will take to get the yds driver to work with
power suspend/resume I noticed that the file src/sys/dev/pci/yds.c failes
to compile with AUDIO_DEBUG enabled.
I am supplying a patch that works for me to make yds.c compile with "option
AUDIO_DEBUG" (and the resulting GENERIC kernel works just fine too).
Please test and commit this patch if possible. Also, please let me know if
I have anything wrong, extraneous, or what could could be better (KNF,
updated methods, etc).
Thanks
-dan
##====================================================================
--- yds.c.orig Thu Dec 6 22:21:09 2001
+++ yds.c Thu Dec 6 22:34:51 2001
@@ -69,6 +69,11 @@
#include <dev/pci/ydsreg.h>
#include <dev/pci/ydsvar.h>
+#ifdef AUDIO_DEBUG
+#include <uvm/uvm_extern.h> /* for vtophys */
+#include <uvm/uvm_pmap.h> /* for vtophys */
+#endif
+
/* Debug */
#undef YDS_USE_REC_SLOT
#define YDS_USE_P44
@@ -77,6 +82,9 @@
# define DPRINTF(x) if (ydsdebug) printf x
# define DPRINTFN(n,x) if (ydsdebug>(n)) printf x
int ydsdebug = 0;
+#ifndef __NetBSD__
+#define bitmask_snprintf(q,f,b,l) snprintf((b), (l), "%b", (q), (f))
+#endif
#else
# define DPRINTF(x)
# define DPRINTFN(n,x)
Visit your host, monkey.org