Print this page
3015 lofiadm should use libz.so.1, not libz.so

@@ -22,10 +22,11 @@
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  * Copyright 2012 Joyent, Inc.  All rights reserved.
  *
  * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2014 Gary Mills
  */
 
 /*
  * lofiadm - administer lofi(7d). Very simple, add and remove file<->device
  * associations, and display status. All the ioctls are private between

@@ -148,11 +149,11 @@
 #define SEGSIZE                 131072
 #define BLOCK_SIZE              512
 #define KILOBYTE                1024
 #define MEGABYTE                (KILOBYTE * KILOBYTE)
 #define GIGABYTE                (KILOBYTE * MEGABYTE)
-#define LIBZ                    "libz.so"
+#define LIBZ                    "libz.so.1"
 
 static void
 usage(const char *pname)
 {
         (void) fprintf(stderr, gettext(USAGE), pname, pname, pname,

@@ -166,11 +167,11 @@
         static int (*compress2p)(void *, ulong_t *, void *, size_t, int) = NULL;
         void *libz_hdl = NULL;
 
         /*
          * The first time we are called, attempt to dlopen()
-         * libz.so and get a pointer to the compress2() function
+         * libz.so.1 and get a pointer to the compress2() function
          */
         if (compress2p == NULL) {
                 if ((libz_hdl = openlib(LIBZ)) == NULL)
                         die(gettext("could not find %s. "
                             "gzip compression unavailable\n"), LIBZ);