Index: libshare/usr/src/lib/libshare/common/libshare_impl.h =================================================================== --- libshare.orig/usr/src/lib/libshare/common/libshare_impl.h 2012-10-08 04:25:42.000000000 +0400 +++ libshare/usr/src/lib/libshare/common/libshare_impl.h 2013-09-27 12:30:54.525002798 +0400 @@ -43,9 +43,6 @@ extern "C" { #endif -/* directory to find plugin modules in */ -#define SA_LIB_DIR "/usr/lib/fs" - /* default group name for dfstab file */ #define SA_DEFAULT_FILE_GRP "sys" Index: libshare/usr/src/lib/libshare/common/plugin.c =================================================================== --- libshare.orig/usr/src/lib/libshare/common/plugin.c 2012-10-08 04:25:42.000000000 +0400 +++ libshare/usr/src/lib/libshare/common/plugin.c 2013-09-27 12:31:32.600779970 +0400 @@ -39,6 +39,14 @@ #include #include #include +#include + +/* directory to find plugin modules in */ +#ifdef DEB_HOST_MULTIARCH +#define SA_LIB_DIR "/usr/lib/" DEB_HOST_MULTIARCH "/libshare" +#else +#define SA_LIB_DIR "/usr/lib/fs" +#endif #define MAXISALEN 257 /* based on sysinfo(2) man page */ @@ -93,14 +101,16 @@ struct dirent *dent; int ret = SA_OK; struct stat st; - char isa[MAXISALEN]; +#ifndef DEB_HOST_MULTIARCH + char isa[MAXISALEN]; #if defined(_LP64) if (sysinfo(SI_ARCHITECTURE_64, isa, MAXISALEN) == -1) isa[0] = '\0'; #else isa[0] = '\0'; #endif +#endif if ((dir = opendir(SA_LIB_DIR)) == NULL) return (SA_OK); @@ -111,9 +121,18 @@ if (proto_is_dot_or_dotdot(dent->d_name)) continue; +#ifndef DEB_HOST_MULTIARCH (void) snprintf(path, MAXPATHLEN, "%s/%s/%s/libshare_%s.so.1", SA_LIB_DIR, dent->d_name, isa, dent->d_name); +#else + if (fnmatch("libshare_*.so.1", dent->d_name, 0)) + continue; + + (void) snprintf(path, MAXPATHLEN, + "%s/%s", SA_LIB_DIR, /* SA_LIB_DIR includes DEB_HOST_MULTIARCH */ + dent->d_name); +#endif /* * If file doesn't exist, don't try to map it Index: libshare/usr/src/lib/libshare/Makefile.com =================================================================== --- libshare.orig/usr/src/lib/libshare/Makefile.com 2012-10-08 04:25:42.000000000 +0400 +++ libshare/usr/src/lib/libshare/Makefile.com 2013-09-27 12:25:45.936723597 +0400 @@ -46,6 +46,7 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-switch CPPFLAGS += -D_REENTRANT -I$(NFSLIB_DIR) -I/usr/include/libxml2 +CPPFLAGS += -DDEB_HOST_MULTIARCH=\"$(DEB_HOST_MULTIARCH)\" .KEEP_STATE: Index: libshare/usr/src/lib/libshare/autofs/Makefile.com =================================================================== --- libshare.orig/usr/src/lib/libshare/autofs/Makefile.com 2012-10-08 04:25:42.000000000 +0400 +++ libshare/usr/src/lib/libshare/autofs/Makefile.com 2013-09-27 12:25:45.938830331 +0400 @@ -33,8 +33,8 @@ include ../../../Makefile.lib -ROOTLIBDIR = $(ROOT)/usr/lib/fs/autofs -ROOTLIBDIR64 = $(ROOT)/usr/lib/fs/autofs/$(MACH64) +ROOTLIBDIR = $(ROOT)/usr/lib/$(DEB_HOST_MULTIARCH)/libshare +ROOTLIBDIR64 = $(ROOTLIBDIR) LIBSRCS = $(LIBOBJS:%.o=$(SRCDIR)/%.c) # we don't want to lint the sources for OTHOBJS since they are pre-existing files Index: libshare/usr/src/lib/libshare/nfs/Makefile.com =================================================================== --- libshare.orig/usr/src/lib/libshare/nfs/Makefile.com 2012-10-08 04:25:42.000000000 +0400 +++ libshare/usr/src/lib/libshare/nfs/Makefile.com 2013-09-27 12:25:45.941127600 +0400 @@ -33,8 +33,8 @@ include ../../../Makefile.lib -ROOTLIBDIR = $(ROOT)/usr/lib/fs/nfs -ROOTLIBDIR64 = $(ROOT)/usr/lib/fs/nfs/$(MACH64) +ROOTLIBDIR = $(ROOT)/usr/lib/$(DEB_HOST_MULTIARCH)/libshare +ROOTLIBDIR64 = $(ROOTLIBDIR) LIBSRCS = $(LIBOBJS:%.o=$(SRCDIR)/%.c) # we don't want to lint the sources for OTHOBJS since they are pre-existing files Index: libshare/usr/src/lib/libshare/smb/Makefile.com =================================================================== --- libshare.orig/usr/src/lib/libshare/smb/Makefile.com 2013-09-27 12:25:45.343870095 +0400 +++ libshare/usr/src/lib/libshare/smb/Makefile.com 2013-09-27 12:25:45.943038480 +0400 @@ -38,8 +38,8 @@ include ../../../Makefile.lib -ROOTLIBDIR = $(ROOT)/usr/lib/fs/smb -ROOTLIBDIR64 = $(ROOT)/usr/lib/fs/smb/$(MACH64) +ROOTLIBDIR = $(ROOT)/usr/lib/$(DEB_HOST_MULTIARCH)/libshare +ROOTLIBDIR64 = $(ROOTLIBDIR) LIBSRCS = $(LIBOBJS:%.o=$(SRCDIR)/%.c) lintcheck := SRCS = $(LIBSRCS) Index: libshare/usr/src/lib/libshare/smbfs/Makefile.com =================================================================== --- libshare.orig/usr/src/lib/libshare/smbfs/Makefile.com 2012-10-08 04:25:42.000000000 +0400 +++ libshare/usr/src/lib/libshare/smbfs/Makefile.com 2013-09-27 12:25:45.944931050 +0400 @@ -32,8 +32,8 @@ include ../../../Makefile.lib -ROOTLIBDIR = $(ROOT)/usr/lib/fs/smbfs -ROOTLIBDIR64 = $(ROOT)/usr/lib/fs/smbfs/$(MACH64) +ROOTLIBDIR = $(ROOT)/usr/lib/$(DEB_HOST_MULTIARCH)/libshare +ROOTLIBDIR64 = $(ROOTLIBDIR) LIBSRCS = $(LIBOBJS:%.o=$(SRCDIR)/%.c)