Print this page
5910 libnisdb won't build with modern GCC

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libnisdb/yptol/update.c
          +++ new/usr/src/lib/libnisdb/yptol/update.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   *
  14   14   * When distributing Covered Code, include this CDDL HEADER in each
  15   15   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16   16   * If applicable, add the following below this CDDL HEADER, with the
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
       23 + * Copyright 2015 Gary Mills
  23   24   * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
  24   25   * Use is subject to license terms.
  25   26   */
  26   27  
  27      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  28      -
  29   28  /*
  30   29   * DESCRIPTION: Contains the map update thread and related code.
  31   30   */
  32   31  
  33   32  #include <unistd.h>
  34   33  #include <syslog.h>
  35   34  #include <ndbm.h>
  36   35  #include <thread.h>
  37   36  #include <unistd.h>
  38   37  #include <strings.h>
↓ open down ↓ 312 lines elided ↑ open up ↑
 351  350          if (SUCCESS == update_map_from_dit(map, FALSE))
 352  351                  ret = 0;
 353  352  
 354  353          /* Update complete or failed */
 355  354          unlock_map_update(map);
 356  355  
 357  356          /* Free up duplicate copy of the map_ctrl */
 358  357          free_map_ctrl(map);
 359  358  
 360  359          thr_exit(ret);
      360 +
      361 +        return (NULL);
 361  362  }
 362  363  
 363  364  /*
 364  365   * FUNCTION :   is_special_key()
 365  366   *
 366  367   * DESCRIPTION: Works out if a given key is one of the special ones. We just
 367  368   *              check for the "YP_" prefix. This is not 100% safe but if
 368  369   *              valid keys with a "YP_" prefix exist in the DIT then a lot of
 369  370   *              other parts of NIS wont work.
 370  371   */
 371  372  bool_t
 372  373  is_special_key(datum *key)
 373  374  {
 374  375          if (0 == strncmp(key->dptr, yp_prefix, yp_prefix_sz))
 375  376                  return (TRUE);
 376  377  
 377  378          return (FALSE);
 378  379  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX