summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2006-02-27 12:04:13 +0000
committeryar <yar@FreeBSD.org>2006-02-27 12:04:13 +0000
commit3822005cd36df85e1b4a87c4012224265ee9e7da (patch)
tree1eb7728f57e5547ecce3d3666051d4478399595e
parentaacbf565b52cf76f5f6b58b2d426954719d628b2 (diff)
downloadFreeBSD-src-3822005cd36df85e1b4a87c4012224265ee9e7da.zip
FreeBSD-src-3822005cd36df85e1b4a87c4012224265ee9e7da.tar.gz
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
-rw-r--r--sys/coda/coda.h7
-rw-r--r--sys/fs/coda/coda.h7
-rw-r--r--sys/modules/coda5/Makefile2
3 files changed, 13 insertions, 3 deletions
diff --git a/sys/coda/coda.h b/sys/coda/coda.h
index bd87a9e..7cc6277 100644
--- a/sys/coda/coda.h
+++ b/sys/coda/coda.h
@@ -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__
diff --git a/sys/fs/coda/coda.h b/sys/fs/coda/coda.h
index bd87a9e..7cc6277 100644
--- a/sys/fs/coda/coda.h
+++ b/sys/fs/coda/coda.h
@@ -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__
diff --git a/sys/modules/coda5/Makefile b/sys/modules/coda5/Makefile
index a284632..5634bff 100644
--- a/sys/modules/coda5/Makefile
+++ b/sys/modules/coda5/Makefile
@@ -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>
OpenPOWER on IntegriCloud