lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1693 - in nss-pam-ldapd: . nslcd nss

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1693 - in nss-pam-ldapd: . nslcd nss



Author: arthur
Date: Fri May 18 16:21:48 2012
New Revision: 1693
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1693&view=revision

Log:
get rid of a few compiler warnings on FreeBSD

Modified:
   nss-pam-ldapd/configure.ac
   nss-pam-ldapd/nslcd/myldap.c
   nss-pam-ldapd/nslcd/nslcd.c
   nss-pam-ldapd/nss/bsdnss.c

Modified: nss-pam-ldapd/configure.ac
==============================================================================
--- nss-pam-ldapd/configure.ac  Thu May 17 13:28:33 2012        (r1692)
+++ nss-pam-ldapd/configure.ac  Fri May 18 16:21:48 2012        (r1693)
@@ -273,7 +273,7 @@
             ,[ with_nss_maps="all" ])
 
 # checks for availability of header files
-AC_CHECK_HEADERS([ctype.h strings.h pthread.h fcntl.h limits.h])
+AC_CHECK_HEADERS([ctype.h strings.h pthread.h pthread_np.h fcntl.h limits.h])
 AC_CHECK_HEADERS([nss.h nss_common.h grp.h shadow.h aliases.h netdb.h 
rpc/rpcent.h])
 AC_CHECK_HEADERS([netinet/ether.h arpa/inet.h netinet/in.h])
 AC_CHECK_HEADERS([nsswitch.h nss_dbdefs.h])
@@ -590,7 +590,9 @@
   # replace daemon() function if it is not on the system
   AC_SEARCH_LIBS(daemon,bsd)
   AC_REPLACE_FUNCS(daemon)
-  AC_CHECK_DECLS([daemon],,,[#include <unistd.h>])
+  AC_CHECK_DECLS([daemon],,,[
+      #include <unistd.h>
+      #include <stdlib.h>])
 
   # replace ether_aton_r() and ether_ntoa_r() if they are not found
   AC_CHECK_FUNCS(ether_aton_r ether_ntoa_r,,[AC_LIBOBJ(ether)])

Modified: nss-pam-ldapd/nslcd/myldap.c
==============================================================================
--- nss-pam-ldapd/nslcd/myldap.c        Thu May 17 13:28:33 2012        (r1692)
+++ nss-pam-ldapd/nslcd/myldap.c        Fri May 18 16:21:48 2012        (r1693)
@@ -519,7 +519,7 @@
   struct timeval tv;
   int rc=LDAP_SUCCESS;
   int sd;
-  log_log(LOG_DEBUG,"set_socket_timeout(%lu,%lu)",sec,usec);
+  log_log(LOG_DEBUG,"set_socket_timeout(%lu,%lu)",(unsigned long)sec,(unsigned 
long)usec);
   /* get the socket */
   if ((rc=ldap_get_option(ld,LDAP_OPT_DESC,&sd))!=LDAP_SUCCESS)
   {

Modified: nss-pam-ldapd/nslcd/nslcd.c
==============================================================================
--- nss-pam-ldapd/nslcd/nslcd.c Thu May 17 13:28:33 2012        (r1692)
+++ nss-pam-ldapd/nslcd/nslcd.c Fri May 18 16:21:48 2012        (r1693)
@@ -49,6 +49,9 @@
 #include <nss.h>
 #endif /* HAVE_NSS_H */
 #include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif /* HAVE_PTHREAD_NP_H */
 #ifndef HAVE_GETOPT_LONG
 #include "compat/getopt_long.h"
 #endif /* not HAVE_GETOPT_LONG */

Modified: nss-pam-ldapd/nss/bsdnss.c
==============================================================================
--- nss-pam-ldapd/nss/bsdnss.c  Thu May 17 13:28:33 2012        (r1692)
+++ nss-pam-ldapd/nss/bsdnss.c  Fri May 18 16:21:48 2012        (r1693)
@@ -6,7 +6,7 @@
    Copyright (C) 2003 Jacques Vidrine
    Copyright (C) 2006 Artem Kazakov
    Copyright (C) 2009 Alexander V. Chernikov
-   Copyright (C) 2011 Arthur de Jong
+   Copyright (C) 2011, 2012 Arthur de Jong
    Copyright (C) 2011 Tom Judge
 
    This library is free software; you can redistribute it and/or
@@ -147,7 +147,7 @@
   return (status);
 }
 
-int __gr_addgid(gid_t gid,gid_t *groups,int maxgrp,int *groupc)
+static int __gr_addgid(gid_t gid,gid_t *groups,int maxgrp,int *groupc)
 {
   int ret,dupc;
   /* skip duplicates */
@@ -171,12 +171,10 @@
   nss_status_t s;
   gid_t group;
   gid_t *tmpgroups;
-  size_t bufsize;
   const char *user;
   gid_t *groups;
-  gid_t agroup;
   int maxgrp,*grpcnt;
-  int i,rv,ret_errno;
+  int i;
   long int lstart,lsize;
   user=va_arg(ap,const char *);
   group=va_arg(ap,gid_t);
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/