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

@@ -17,16 +17,15 @@
  * information: Portions Copyright [yyyy] [name of copyright owner]
  *
  * CDDL HEADER END
  */
 /*
+ * Copyright 2015 Gary Mills
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 /*
  * DESCRIPTION: This is the N2L equivalent of changepasswd.c. The traditional
  *              version modifies the NIS source files and then initiates a
  *              ypmake to make the maps and push them.
  *

@@ -68,10 +67,15 @@
 /* DO NOT INCLUDE SHIM_HOOKS.H */
 #include "shim.h"
 #include "yptol.h"
 #include "../ldap_util.h"
 
+/*
+ * Undocumented external function in libnsl
+ */
+extern int  getdomainname(char *, int);
+
 /* Constants */
 #define CRYPTPWSIZE CRYPT_MAXCIPHERTEXTLEN
 #define STRSIZE 100
 #define FINGERSIZE (4 * STRSIZE - 4)
 #define SHELLSIZE (STRSIZE - 2)

@@ -431,11 +435,10 @@
         char    *myself = "proc_map_list";
         char    *map_name;
         char    cmdbuf[BUFSIZ];
         int     map_name_len = 0;
         int     index, ans = 0;
-        int     res;
 
         /* If this is a adjunct list check LDAP had some adjunct info */
         if ((adjunct_flag) && (!pwd->adjunct)) {
                 logmsg(MSG_NOTIMECHECK, LOG_INFO,
                         "Have adjunct map list but no adjunct data in DIT");

@@ -1052,11 +1055,10 @@
 struct passwd_entry *
 get_old_info(char *name, char *domain)
 {
         char *myself = "get_old_info";
         struct passwd_entry *old_passwd;
-        char    *p;
         datum   key, data;
         suc_code res;
 
         /* Get the password entry */
         key.dptr = name;