--- old/usr/src/lib/libwrap/Makefile	Tue Dec 10 10:59:16 2013
+++ new/usr/src/lib/libwrap/Makefile	Tue Dec 10 10:59:16 2013
@@ -10,7 +10,8 @@
 HDRS =		tcpd.h
 CHECKHDRS =
 HDRDIR =	.
-SUBDIRS	=	$(MACH)
+SUBDIRS =       $(MACH)
+$(BUILD64)SUBDIRS += $(MACH64)
 
 all := 		TARGET = all
 clean :=	TARGET = clean
--- old/usr/src/lib/libwrap/Makefile.com	Tue Dec 10 10:59:16 2013
+++ new/usr/src/lib/libwrap/Makefile.com	Tue Dec 10 10:59:16 2013
@@ -38,9 +38,10 @@
 LIBS =		$(DYNLIB) $(LINTLIB)
 SONAME =	$(LIBRARY:.a=.so)$(MAJOR)
 ROOTLINKS +=	$(ROOTLIBDIR)/$(LIBLINKS)$(MAJOR)
+ROOTLINKS64 +=	$(ROOTLIBDIR64)/$(LIBLINKS)$(MAJOR)
 $(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
 
-MAPFILES =	../mapfile
+MAPFILES =	../mapfile-vers
 
 LDLIBS +=	-lsocket -lnsl -lc
 
@@ -68,6 +69,9 @@
 $(ROOTLIBDIR)/$(LIBLINKS)$(MAJOR): $(ROOTLIBDIR)/$(LIBLINKS)$(VERS)
 	$(INS.liblink)
 
+$(ROOTLIBDIR64)/$(LIBLINKS)$(MAJOR): $(ROOTLIBDIR64)/$(LIBLINKS)$(VERS)
+	$(INS.liblink64)
+
 include ../../Makefile.targ
 
 
--- /dev/null	Tue Dec 10 10:59:17 2013
+++ new/usr/src/lib/libwrap/amd64/Makefile	Tue Dec 10 10:59:17 2013
@@ -0,0 +1,11 @@
+#
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+#
+
+include ../Makefile.com
+include $(SRC)/lib/Makefile.lib.64
+
+install: all $(ROOTLIBS64) .WAIT $(ROOTLINKS64) $(ROOTLINT)
--- old/usr/src/lib/libwrap/mapfile	Tue Dec 10 10:59:17 2013
+++ /dev/null	Tue Dec 10 10:59:17 2013
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING:  STOP NOW.  DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-#	usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-#
-# Linker mapfile that allows the dynamic library to reference some symbols
-# defined by the application.
-#
-
-$mapfile_version 2
-
-SYMBOL_SCOPE {
-	global:
-		allow_severity		{ FLAGS = NODIRECT; };
-		deny_severity		{ FLAGS = NODIRECT; };
-};
--- /dev/null	Tue Dec 10 10:59:17 2013
+++ new/usr/src/lib/libwrap/mapfile-vers	Tue Dec 10 10:59:17 2013
@@ -0,0 +1,72 @@
+#
+# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+#
+
+#
+# MAPFILE HEADER START
+#
+# WARNING:  STOP NOW.  DO NOT MODIFY THIS FILE.
+# Object versioning must comply with the rules detailed in
+#
+#	usr/src/lib/README.mapfiles
+#
+# You should not be making modifications here until you've read the most current
+# copy of that file. If you need help, contact a gatekeeper for guidance.
+#
+# MAPFILE HEADER END
+#
+
+#
+# Linker mapfile that allows the dynamic library to reference some symbols
+# defined by the application.
+#
+
+$mapfile_version 2
+
+SYMBOL_VERSION ILLUMOS_0.1 {
+	global:
+		allow_severity		{ FLAGS = NODIRECT; };
+		clean_exit;
+		deny_severity		{ FLAGS = NODIRECT; };
+		dot_quad_addr;
+		dry_run;
+		eval_client;
+		eval_hostaddr;
+		eval_hostinfo;
+		eval_hostname;
+		eval_server;
+		eval_user;
+		fromhost;
+		hosts_access;
+		hosts_access_verbose;
+		hosts_allow_table;
+		hosts_ctl;
+		hosts_deny_table;
+		numeric_addr;
+		paranoid;
+		percent_m;
+		percent_x;
+		process_options;
+		refuse;
+		request_init;
+		request_set;
+		rfc931;
+		rfc931_timeout;
+		shell_cmd;
+		skip_ipv6_addrs;
+		sock_host;
+		sock_hostaddr;
+		sock_hostname;
+		sockgen_simplify;
+		split_at;
+		tcpd_buf;
+		tcpd_context;
+		tcpd_gethostbyname;
+		tcpd_warn;
+		tli_host;
+		unknown;
+		xgets;
+	local:
+		*;
+};
--- old/usr/src/lib/libwrap/percent_m.c	Tue Dec 10 10:59:17 2013
+++ new/usr/src/lib/libwrap/percent_m.c	Tue Dec 10 10:59:17 2013
@@ -2,8 +2,6 @@
  * Copyright 2001 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
  /*
   * Replace %m by system error message.
   * 
@@ -19,10 +17,6 @@
 #include <string.h>
 
 extern int errno;
-#ifndef SYS_ERRLIST_DEFINED
-extern char *sys_errlist[];
-extern int sys_nerr;
-#endif
 
 #include "mystdarg.h"
 
@@ -35,11 +29,7 @@
 
     while (*bp = *cp)
 	if (*cp == '%' && cp[1] == 'm') {
-	    if (errno < sys_nerr && errno > 0) {
-		strcpy(bp, sys_errlist[errno]);
-	    } else {
-		sprintf(bp, "Unknown error %d", errno);
-	    }
+	    strcpy(bp, strerror(errno));
 	    bp += strlen(bp);
 	    cp += 2;
 	} else {
--- /dev/null	Tue Dec 10 10:59:17 2013
+++ new/usr/src/lib/libwrap/sparcv9/Makefile	Tue Dec 10 10:59:17 2013
@@ -0,0 +1,11 @@
+#
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+#
+
+include ../Makefile.com
+include $(SRC)/lib/Makefile.lib.64
+
+install: all $(ROOTLIBS64) .WAIT $(ROOTLINKS64) $(ROOTLINT)
--- old/usr/src/lib/libwrap/tli.c	Tue Dec 10 10:59:17 2013
+++ new/usr/src/lib/libwrap/tli.c	Tue Dec 10 10:59:17 2013
@@ -3,8 +3,6 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
  /*
   * tli_host() determines the type of transport (connected, connectionless),
   * the transport address of a client host, and the transport address of a
@@ -49,8 +47,6 @@
 
 extern char *nc_sperror();
 extern int errno;
-extern char *sys_errlist[];
-extern int sys_nerr;
 extern int t_errno;
 extern char *t_errlist[];
 extern int t_nerr;
@@ -320,18 +316,14 @@
 
     if (t_errno != TSYSERR) {
 	if (t_errno < 0 || t_errno >= t_nerr) {
-	    sprintf(buf, "Unknown TLI error %d", t_errno);
+	    snprintf(buf, sizeof (buf), "Unknown TLI error %d", t_errno);
 	    return (buf);
 	} else {
 	    return (t_errlist[t_errno]);
 	}
     } else {
-	if (errno < 0 || errno >= sys_nerr) {
-	    sprintf(buf, "Unknown UNIX error %d", errno);
-	    return (buf);
-	} else {
-	    return (sys_errlist[errno]);
-	}
+	STRN_CPY(buf, strerror(errno), sizeof (buf));
+	return (buf);
     }
 }
 
--- old/usr/src/pkg/manifests/developer-library-lint.mf	Tue Dec 10 10:59:18 2013
+++ new/usr/src/pkg/manifests/developer-library-lint.mf	Tue Dec 10 10:59:18 2013
@@ -231,6 +231,7 @@
 file path=usr/lib/$(ARCH64)/llib-lsmbios.ln
 $(sparc_ONLY)file path=usr/lib/$(ARCH64)/llib-lv12n.ln
 file path=usr/lib/$(ARCH64)/llib-lvolmgt.ln
+file path=usr/lib/$(ARCH64)/llib-lwrap.ln
 file path=usr/lib/$(ARCH64)/llib-lzoneinfo.ln
 file path=usr/lib/$(ARCH64)/values-Xa.o
 file path=usr/lib/$(ARCH64)/values-Xc.o
--- old/usr/src/pkg/manifests/system-library.mf	Tue Dec 10 10:59:18 2013
+++ new/usr/src/pkg/manifests/system-library.mf	Tue Dec 10 10:59:18 2013
@@ -365,6 +365,7 @@
 file path=usr/lib/$(ARCH64)/libsum.so.1
 $(sparc_ONLY)file path=usr/lib/$(ARCH64)/libv12n.so.1
 file path=usr/lib/$(ARCH64)/libvolmgt.so.1
+file path=usr/lib/$(ARCH64)/libwrap.so.1.0
 file path=usr/lib/$(ARCH64)/liby.so.1
 file path=usr/lib/$(ARCH64)/libzoneinfo.so.1
 file path=usr/lib/$(ARCH64)/nss_ad.so.1
@@ -990,6 +991,8 @@
 link path=usr/lib/$(ARCH64)/libvolmgt.so target=libvolmgt.so.1
 link path=usr/lib/$(ARCH64)/libw.so target=../../../lib/$(ARCH64)/libw.so.1
 link path=usr/lib/$(ARCH64)/libw.so.1 target=../../../lib/$(ARCH64)/libw.so.1
+link path=usr/lib/$(ARCH64)/libwrap.so target=libwrap.so.1.0
+link path=usr/lib/$(ARCH64)/libwrap.so.1 target=libwrap.so.1.0
 link path=usr/lib/$(ARCH64)/libxnet.so \
     target=../../../lib/$(ARCH64)/libxnet.so.1
 link path=usr/lib/$(ARCH64)/libxnet.so.1 \
