add a compile-time check that audio(4) was actually configured into kernel

assumption here is that all (and only) audio device drivers include this header
adresses PR kern/11508 by Thomas Klausner
This commit is contained in:
jdolecek 2003-03-19 10:53:40 +00:00
parent 3d147c386a
commit 01c5cb6a8b

View File

@ -1,4 +1,4 @@
/* $NetBSD: audio_if.h,v 1.47 2003/02/01 06:23:36 thorpej Exp $ */
/* $NetBSD: audio_if.h,v 1.48 2003/03/19 10:53:40 jdolecek Exp $ */
/*
* Copyright (c) 1994 Havard Eidnes.
@ -37,6 +37,16 @@
#ifndef _SYS_DEV_AUDIO_IF_H_
#define _SYS_DEV_AUDIO_IF_H_
/* check we have an audio(4) configured into kernel */
#if defined(_KERNEL_OPT)
#include "audio.h"
#if NAUDIO == 0
#error "No 'audio* at audiobus?' configured into kernel"
#endif
#endif /* _KERNEL_OPT */
/*
* Generic interface to hardware driver.
*/