CODA_COMPAT_5 may not be defined unconditionally in the coda5 module.
Otherwise a kernel build would break in the coda5 module if the main kernel conf file enabled CODA_COMPAT_5, too. Redefined symbols are strictly disallowed by -Werror. To overcome this issue, introduce a different symbol indicating coda5 build, CODA5_MODULE, and translate it to CODA_COMPAT_5 appropriately in /sys/coda/coda.h. MFC after: 3 days
This commit is contained in:
parent
94341e74d5
commit
82967ff0b8
@ -41,7 +41,12 @@
|
||||
#ifndef _CODA_HEADER_
|
||||
#define _CODA_HEADER_
|
||||
|
||||
#include "opt_coda.h" /* for COMPAT_CODA_5 option */
|
||||
#include "opt_coda.h" /* for CODA_COMPAT_5 option */
|
||||
|
||||
/* Avoid CODA_COMPAT_5 redefinition in coda5 module */
|
||||
#if defined (CODA5_MODULE) && !defined(CODA_COMPAT_5)
|
||||
#define CODA_COMPAT_5
|
||||
#endif
|
||||
|
||||
/* Catch new _KERNEL defn for NetBSD */
|
||||
#ifdef __NetBSD__
|
||||
|
@ -41,7 +41,12 @@
|
||||
#ifndef _CODA_HEADER_
|
||||
#define _CODA_HEADER_
|
||||
|
||||
#include "opt_coda.h" /* for COMPAT_CODA_5 option */
|
||||
#include "opt_coda.h" /* for CODA_COMPAT_5 option */
|
||||
|
||||
/* Avoid CODA_COMPAT_5 redefinition in coda5 module */
|
||||
#if defined (CODA5_MODULE) && !defined(CODA_COMPAT_5)
|
||||
#define CODA_COMPAT_5
|
||||
#endif
|
||||
|
||||
/* Catch new _KERNEL defn for NetBSD */
|
||||
#ifdef __NetBSD__
|
||||
|
@ -8,6 +8,6 @@ SRCS= vnode_if.h \
|
||||
coda_venus.c coda_vfsops.c coda_vnops.c \
|
||||
opt_coda.h
|
||||
|
||||
CFLAGS+= -DCODA_COMPAT_5
|
||||
CFLAGS+= -DCODA5_MODULE
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user