From: Chas Williams (CONTRACTOR) Date: Wed, 16 Mar 2011 14:32:48 +0000 (-0400) Subject: rx: always use/protect the xdr routines in the kernel X-Git-Tag: upstream/1.6.0.pre6^2~17 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=0d02d71908a624406e730a334dd9e0ec5f2dbad8;p=packages%2Fo%2Fopenafs.git rx: always use/protect the xdr routines in the kernel This clears up some warnings about duplicate symbols with Solaris 11 since the Solaris kernel already has these routines. Since we never use stock kernel version of the xdr routines perhaps we should always use/protect our version of the symbols. Reviewed-on: http://gerrit.openafs.org/4252 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 8336d31ac5092a16cfb206707e69c19f07f99241) Change-Id: Iebf4470f5ddfc591f52f51d1d080bd58d11683a8 Reviewed-on: http://gerrit.openafs.org/4682 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/libuafs/Makefile.common.in b/src/libuafs/Makefile.common.in index 2c7741e5d..e6af74457 100644 --- a/src/libuafs/Makefile.common.in +++ b/src/libuafs/Makefile.common.in @@ -149,6 +149,7 @@ UAFSOBJ = \ $(UOBJ)/osi_vcache.o \ $(UOBJ)/afsaux.o \ $(UOBJ)/Kvice.xdr.o \ + $(UOBJ)/xdr_array.o \ $(UOBJ)/xdr_arrayn.o \ $(UOBJ)/Kvice.cs.o \ $(UOBJ)/fcrypt.o \ @@ -285,6 +286,7 @@ AFSWEBOBJ = \ $(WEBOBJ)/osi_vcache.o \ $(WEBOBJ)/afsaux.o \ $(WEBOBJ)/Kvice.xdr.o \ + $(WEBOBJ)/xdr_array.o \ $(WEBOBJ)/xdr_arrayn.o \ $(WEBOBJ)/Kvice.cs.o \ $(WEBOBJ)/fcrypt.o \ @@ -417,6 +419,7 @@ AFSWEBOBJKRB = \ $(WEBOBJ)/osi_vcache.o \ $(WEBOBJ)/afsaux.o \ $(WEBOBJ)/Kvice.xdr.o \ + $(WEBOBJ)/xdr_array.o \ $(WEBOBJ)/xdr_arrayn.o \ $(WEBOBJ)/Kvice.cs.o \ $(WEBOBJ)/fcrypt.o \ @@ -552,6 +555,7 @@ JUAFSOBJ = \ $(JUAFS)/osi_vcache.o \ $(JUAFS)/afsaux.o \ $(JUAFS)/Kvice.xdr.o \ + $(JUAFS)/xdr_array.o \ $(JUAFS)/xdr_arrayn.o \ $(JUAFS)/Kvice.cs.o \ $(JUAFS)/fcrypt.o \ @@ -800,6 +804,8 @@ $(UOBJ)/afsaux.o: $(TOP_SRC_FSINT)/afsaux.c $(CRULE1) $(UOBJ)/xdr_arrayn.o: $(TOP_SRC_RX)/xdr_arrayn.c $(CRULE1) +$(UOBJ)/xdr_array.o: $(TOP_SRC_RX)/xdr_array.c + $(CRULE1) $(UOBJ)/Kvldbint.cs.o: $(TOP_OBJ_VLSERVER)/Kvldbint.cs.c $(CRULE1) $(UOBJ)/Kvldbint.xdr.o: $(TOP_OBJ_VLSERVER)/Kvldbint.xdr.c @@ -1073,6 +1079,8 @@ $(WEBOBJ)/Kvice.cs.o: $(TOP_OBJ_FSINT)/Kvice.cs.c $(CRULE2) $(WEBOBJ)/afsaux.o: $(TOP_SRC_FSINT)/afsaux.c $(CRULE2) +$(WEBOBJ)/xdr_array.o: $(TOP_SRC_RX)/xdr_array.c + $(CRULE2) $(WEBOBJ)/xdr_arrayn.o: $(TOP_SRC_RX)/xdr_arrayn.c $(CRULE2) $(WEBOBJ)/Kvldbint.cs.o: $(TOP_OBJ_VLSERVER)/Kvldbint.cs.c @@ -1358,6 +1366,8 @@ $(JUAFS)/Kvice.cs.o: $(TOP_OBJ_FSINT)/Kvice.cs.c $(CRULE1) $(JUAFS)/afsaux.o: $(TOP_SRC_FSINT)/afsaux.c $(CRULE1) +$(JUAFS)/xdr_array.o: $(TOP_SRC_RX)/xdr_array.c + $(CRULE1) $(JUAFS)/xdr_arrayn.o: $(TOP_SRC_RX)/xdr_arrayn.c $(CRULE1) $(JUAFS)/Kvldbint.cs.o: $(TOP_OBJ_VLSERVER)/Kvldbint.cs.c diff --git a/src/rx/xdr.h b/src/rx/xdr.h index 0ad3e34bb..e430480c3 100644 --- a/src/rx/xdr.h +++ b/src/rx/xdr.h @@ -63,7 +63,7 @@ #define mem_free(ptr, bsize) free(ptr) #endif -#if defined(AFS_AMD64_LINUX24_ENV) || defined(AFS_DARWIN_ENV) +#if !defined(AFS_NT40_ENV) #define xdr_alloc afs_xdr_alloc #define xdr_free afs_xdr_free #define xdr_void afs_xdr_void diff --git a/src/rx/xdr_array.c b/src/rx/xdr_array.c index b295958ad..ecdf4cce3 100644 --- a/src/rx/xdr_array.c +++ b/src/rx/xdr_array.c @@ -42,7 +42,8 @@ * arrays. See xdr.h for more info on the interface to xdr. */ -#ifdef KERNEL +#if defined(KERNEL) && !defined(UKERNEL) + #include #ifdef AFS_LINUX20_ENV #include "h/string.h"