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

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libnisdb/yptol/ttl_utils.c
          +++ new/usr/src/lib/libnisdb/yptol/ttl_utils.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 2004 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 utilities relating to TTL calculation.
  31   30   */
  32   31  #include <unistd.h>
  33   32  #include <syslog.h>
  34   33  #include <errno.h>
  35   34  #include <strings.h>
  36   35  #include <ndbm.h>
  37   36  #include "ypsym.h"
  38   37  #include "ypdefs.h"
↓ open down ↓ 239 lines elided ↑ open up ↑
 278  277   * INPUTS:      Time value to add to
 279  278   *              Time value to add in seconds
 280  279   *
 281  280   * OUTPUTS:     SUCCESS = Addition successful
 282  281   *              FAILURE = Addition failed (probably wrapped)
 283  282   *
 284  283   */
 285  284  suc_code
 286  285  add_to_timeval(struct timeval *t1, int t2)
 287  286  {
 288      -        long usec;
 289  287          struct timeval oldval;
 290  288  
 291  289          oldval.tv_sec = t1->tv_sec;
 292  290  
 293  291          /* Add seconds part */
 294  292          t1->tv_sec += t2;
 295  293  
 296  294          /* Check for clock wrap */
 297  295          if (!(t1->tv_sec >= oldval.tv_sec)) {
 298  296                  logmsg(MSG_NOTIMECHECK, LOG_ERR,
↓ open down ↓ 37 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX