Include "opt_kbd.h" since certain structures size depend on the value

of KBDIO_DEBUG which may be defined in the kernel config (as it is in NOTES).

This kind of bug is a _really_ horribly thing as we end up with one bit
of code thinking a particular structure is 136 bytes and another that it
is only 112 bytes.

Ideally all places would remember to #include the right "opt_foo.h" file,
but I think in practice file containing the variable sized struct should
#include it explicitly as a precaution.

Detected by:	FlexeLint
This commit is contained in:
Poul-Henning Kamp 2002-10-15 21:35:01 +00:00
parent 02fcfac0ad
commit fb9da1ef43
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105181
2 changed files with 4 additions and 0 deletions

View file

@ -34,6 +34,8 @@
#ifndef _DEV_KBD_ATKBDCREG_H_
#define _DEV_KBD_ATKBDCREG_H_
#include "opt_kbd.h" /* Structures depend on the value if KBDIO_DEBUG */
/* constants */
/* I/O ports */

View file

@ -34,6 +34,8 @@
#ifndef _DEV_KBD_ATKBDCREG_H_
#define _DEV_KBD_ATKBDCREG_H_
#include "opt_kbd.h" /* Structures depend on the value if KBDIO_DEBUG */
/* constants */
/* I/O ports */