Re: diff: fix missing include guard in dev/biovar.h

2018-12-19 Thread Ted Unangst
Jan Klemkow wrote:
> I run into double definition problems because of a missing include guard
> in dev/biovar.h.  The diff below should fix that issue.

Where and how? I don't like adding guards blindly because it leads to laziness
and eventually the include situation is a giant tangled mess. Each header
should be included once in the correct place.



diff: fix missing include guard in dev/biovar.h

2018-12-19 Thread Jan Klemkow
Hi,

I run into double definition problems because of a missing include guard
in dev/biovar.h.  The diff below should fix that issue.

Bye,
Jan

Index: sys/dev/biovar.h
===
RCS file: /cvs/src/sys/dev/biovar.h,v
retrieving revision 1.45
diff -u -p -r1.45 biovar.h
--- sys/dev/biovar.h14 Aug 2016 04:08:03 -  1.45
+++ sys/dev/biovar.h19 Dec 2018 18:00:36 -
@@ -26,6 +26,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _DEV_BIOVAR_H_
+#define _DEV_BIOVAR_H_
+
 /*
  * Devices getting ioctls through this interface should use ioctl class 'B'
  * and command numbers starting from 32, lower ones are reserved for generic
@@ -305,3 +308,4 @@ voidbio_info(struct bio_status *, int, 
 void   bio_warn(struct bio_status *, int, const char *, ...);
 void   bio_error(struct bio_status *, int, const char *, ...);
 #endif
+#endif /* _DEV_BIOVAR_H_ */