]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Merge branch 'master' of git://linux-nfs.org/nfs-utils
authorGreg Banks <gnb@melbourne.sgi.com>
Mon, 3 Jul 2006 04:21:48 +0000 (14:21 +1000)
committerGreg Banks <gnb@melbourne.sgi.com>
Mon, 3 Jul 2006 04:21:48 +0000 (14:21 +1000)
26 files changed:
.gitignore [new file with mode: 0644]
configure.in
support/export/client.c
support/misc/from_local.c
support/nfs/conn.c
support/nfs/rpcmisc.c
tools/rpcgen/rpc_clntout.c
tools/rpcgen/rpc_cout.c
tools/rpcgen/rpc_hout.c
tools/rpcgen/rpc_main.c
tools/rpcgen/rpc_parse.c
tools/rpcgen/rpc_sample.c
tools/rpcgen/rpc_scan.c
tools/rpcgen/rpc_svcout.c
tools/rpcgen/rpc_tblout.c
tools/rpcgen/rpc_util.c
utils/idmapd/idmapd.c
utils/mountd/cache.c
utils/mountd/mountd.c
utils/nhfsstone/nhfsstone.c
utils/statd/log.c
utils/statd/monitor.c
utils/statd/rmtcall.c
utils/statd/statd.c
utils/statd/statd.h
utils/statd/state.c

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..537967c
--- /dev/null
@@ -0,0 +1,56 @@
+# files generated by autoconf, automake, autoheader and libtoolize
+aclocal.m4
+autom4te.cache
+compile
+config.guess
+config.log
+config.sub
+configure
+depcomp
+install-sh
+libtool
+ltmain.sh
+Makefile.in
+missing
+support/include/config.h.in
+# files generated by configure
+confdefs.h
+config.status
+conftest
+conftest.c
+conftest.cpp
+conftest.er1
+conftest.err
+.deps
+Makefile
+support/include/config.h
+support/include/stamp-h1
+# file generated during compilation
+*.o
+.libs
+lib*.a
+tools/rpcgen/rpcgen
+tools/rpcdebug/rpcdebug
+utils/exportfs/exportfs
+utils/idmapd/idmapd
+utils/lockd/lockd
+utils/mountd/mountd
+utils/nfsd/nfsd
+utils/nfsstat/nfsstat
+utils/nhfsstone/nhfsstone
+utils/rquotad/rquotad
+utils/showmount/showmount
+utils/statd/statd
+tools/locktest/testlk
+tools/getiversion/getiversion
+tools/getkversion/getkversion
+support/export/mount.h
+support/export/mount_clnt.c
+support/export/mount_xdr.c
+support/include/mount.h
+utils/statd/sm_inter.h
+utils/statd/sm_inter_clnt.c
+utils/statd/sm_inter_svc.c
+utils/statd/sm_inter_xdr.c
+# generic editor backup et al
+*~
index ded529ffba96ea3aae6b3f95e90023db0f29ef01..6f9ab4024dd4a3622f233bf64f4b845ebb8a25d0 100644 (file)
@@ -151,20 +151,20 @@ AC_CHECK_LIB(socket, main, [LIBSOCKET="-lnsl"])
 AC_CHECK_LIB(nsl, main,        [LIBNSL="-lnsl"])
 AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"])
 if test "$enable_nfsv4" = yes; then
-    AC_CHECK_LIB(event, event_dispatch, [libevent=1], [AC_MSG_ERROR(libevent needed for nfsv4 support)])
-    AC_CHECK_LIB(nfsidmap, nfs4_init_name_mapping, [libnfsidmap=1], [AC_MSG_ERROR(libnfsidmap needed for nfsv4 support)])
-    AC_CHECK_HEADERS(event.h, ,[AC_MSG_ERROR(libevent needed for nfsv4 support)])
-    AC_CHECK_HEADERS(nfsidmap.h, ,[AC_MSG_ERROR(libnfsidmap needed for nfsv4 support)])
+    AC_CHECK_LIB(event, event_dispatch, [libevent=1], AC_MSG_ERROR([libevent needed for nfsv4 support]))
+    AC_CHECK_LIB(nfsidmap, nfs4_init_name_mapping, [libnfsidmap=1], AC_MSG_ERROR([libnfsidmap needed for nfsv4 support]))
+    AC_CHECK_HEADERS(event.h, ,AC_MSG_ERROR([libevent needed for nfsv4 support]))
+    AC_CHECK_HEADERS(nfsidmap.h, ,AC_MSG_ERROR([libnfsidmap needed for nfsv4 support]))
     dnl librpcsecgss already has a dependency on libgssapi,
     dnl but we need to make sure we get the right version
     if test "$enable_gss" = yes; then
-     PKG_CHECK_MODULES([RPCSECGSS], [librpcsecgss >= 0.10], [],
-      [AC_MSG_ERROR([Unable to locate information required to use librpcsecgss.
-       If you have pkgconfig installed, you might try setting environment
-       variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])
+     PKG_CHECK_MODULES(RPCSECGSS, librpcsecgss >= 0.10, ,
+      [AC_MSG_ERROR([Unable to locate information required to use librpcsecgss.])
+       AC_MSG_ERROR([If you have pkgconfig installed, you might try setting environment])
+       AC_MSG_ERROR([variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])
       ]
      )
-    PKG_CHECK_MODULES([GSSAPI], [libgssapi >= 0.9])
+    PKG_CHECK_MODULES(GSSAPI, libgssapi >= 0.9)
     fi
 
 fi
@@ -178,15 +178,19 @@ AC_SUBST(LIBBSD)
 
 if test "$enable_gss" = yes; then
   dnl 'gss' also depends on nfsidmap.h - at least for svcgssd_proc.c
-  AC_CHECK_HEADERS(nfsidmap.h, ,[AC_MSG_ERROR(libnfsidmap needed for gss support)])
-  AC_CHECK_HEADERS(spkm3.h, ,[AC_MSG_WARN(could not locate SPKM3 header; will not have SPKM3 support)])
+  AC_CHECK_HEADERS(nfsidmap.h, ,AC_MSG_ERROR([libnfsidmap needed for gss support]))
+  AC_CHECK_HEADERS(spkm3.h, ,AC_MSG_WARN([could not locate SPKM3 header; will not have SPKM3 support]))
+  dnl the nfs4_set_debug function doesn't appear in all version of the library
+  AC_CHECK_LIB(nfsidmap, nfs4_set_debug,
+              AC_DEFINE(HAVE_NFS4_SET_DEBUG,1,
+                        [Whether nfs4_set_debug() is present in libnfsidmap]),)
 
   dnl Check for Kerberos V5
   AC_KERBEROS_V5
 
   dnl This is not done until here because we need to have KRBLIBS set
   dnl ("librpcsecgss=1" is so that it doesn't get added to LIBS)
-  AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], [AC_MSG_ERROR(librpcsecgss needed for nfsv4 support)], $KRBLIBS)
+  AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], AC_MSG_ERROR([librpcsecgss needed for nfsv4 support]), $KRBLIBS)
   AC_CHECK_LIB(rpcsecgss, authgss_set_debug_level,
               AC_DEFINE(HAVE_AUTHGSS_SET_DEBUG_LEVEL, 1, [Define this if the rpcsec_gss library has the function authgss_set_debug_level]),, $KRBLIBS)
 
@@ -238,7 +242,7 @@ AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \
                gethostbyaddr gethostbyname gethostname getmntent \
                gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \
                realpath rmdir select socket strcasecmp strchr strdup \
-               strerror strrchr strtol strtoul])
+               strerror strrchr strtol strtoul sigprocmask])
 
 
 dnl *************************************************************
@@ -248,6 +252,8 @@ AC_CHECK_SIZEOF(short)
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(long)
 AC_CHECK_SIZEOF(size_t)
+AC_CHECK_SIZEOF(socklen_t)
+
 
 dnl *************************************************************
 dnl Export some path names to config.h
index c09e7620eacb12e782f3e635cb09baa8e48b6c68..33dfdb004efac38fa08269906abbf4b045351d45 100644 (file)
@@ -15,6 +15,7 @@
 #include <arpa/inet.h>
 #include <stdlib.h>
 #include <string.h>
+#include <ctype.h>
 #include <netdb.h>
 #include "xmalloc.h"
 #include "misc.h"
index 56478d7eec5dd8e9cea0b60f00e00c3bf9f08ba2..f6f944ccd621f030fbe970d971e56ab8a5b21b3a 100644 (file)
@@ -35,7 +35,7 @@
  * Mountain View, California  94043
  */
 
-#ifndef lint
+#if 0
 static char sccsid[] = "@(#) from_local.c 1.3 96/05/31 15:52:57";
 #endif
 
index 5160c8b29c2fd2c1632be80cbe67adbe1a0fda38..733bf24f4bc0fccdb77011b9249f095a961b286b 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <errno.h>
+#include <unistd.h>
 #include <rpc/rpc.h>
 #include <rpc/pmap_prot.h>
 #include <rpc/pmap_clnt.h>
index c7bff40ea2fc71aaa00176d5e8940f09723599bc..5b0a88ff76745ea86c019718272bd3c10c66fa77 100644 (file)
 #include <time.h>
 #include "nfslib.h"
 
+#if SIZEOF_SOCKLEN_T - 0 == 0
+#define socklen_t int
+#endif
+
 static void    closedown(int sig);
 int    makesock(int port, int proto);
 
@@ -48,13 +52,13 @@ rpc_init(char *name, int prog, int vers, void (*dispatch)(), int defport)
        struct sockaddr_in saddr;
        SVCXPRT *transp;
        int     sock;
-       int     asize;
+       socklen_t asize;
 
        asize = sizeof(saddr);
        sock = 0;
        if (getsockname(0, (struct sockaddr *) &saddr, &asize) == 0
            && saddr.sin_family == AF_INET) {
-               int ssize = sizeof (int);
+               socklen_t ssize = sizeof (int);
                int fdtype = 0;
                if (getsockopt(0, SOL_SOCKET, SO_TYPE,
                                (char *)&fdtype, &ssize) == -1)
@@ -228,10 +232,12 @@ rpc_logcall(struct svc_req *rqstp, char *xname, char *arg)
                break;
        case AUTH_UNIX: {
                struct authunix_parms *unix_cred;
+               time_t time;
                struct tm *tm;
 
                unix_cred = (struct authunix_parms *) rqstp->rq_clntcred;
-               tm = localtime(&unix_cred->aup_time);
+               time = unix_cred->aup_time;
+               tm = localtime(&time);
                snprintf(sp, buflen, "UNIX %d/%d/%d %02d:%02d:%02d %s %d.%d",
                        tm->tm_year, tm->tm_mon + 1, tm->tm_mday,
                        tm->tm_hour, tm->tm_min, tm->tm_sec,
index 3ea267a7d2a0c20fca0c40fe259cfdb08cf8970a..0d3179f0051dcd12ccc5f036f0ba5708c4561c76 100644 (file)
@@ -28,7 +28,7 @@
  * Mountain View, California  94043
  */
 
-#ifndef lint
+#if 0
 static char sccsid[] = "@(#)rpc_clntout.c 1.11 89/02/22 (C) 1987 SMI";
 #endif
 
index af9288dcbc4ada484da27f04f3d463c9a0b4fdee..cae87173c5915718e609c67c83951e506f3febf8 100644 (file)
@@ -28,7 +28,7 @@
  * Mountain View, California  94043
  */
 
-#ifndef lint
+#if 0
 static char sccsid[] = "@(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI";
 #endif
 
index 27ed4d5ba5f29cf79ea42bdd768878a9b5882547..bbb13eb1dcbfecb133a08fd290da432aef0a5b87 100644 (file)
@@ -28,7 +28,7 @@
  * Mountain View, California  94043
  */
 
-#ifndef lint
+#if 0
 static char sccsid[] = "@(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI";
 #endif
 
index 265106029cc79dd914d7097b11ecc8bffbd25a48..6866f3cf40913ba8e71232831836152dcc886fc6 100644 (file)
@@ -28,7 +28,7 @@
  * Mountain View, California  94043
  */
 
-#ifndef lint
+#if 0
 static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI";
 #endif
 
index 70d1260e12f1ab2df493bceb1eedb43409aac523..52300a47335b698fb3e8b46f2a4a9843fc00fed7 100644 (file)
@@ -28,7 +28,7 @@
  * Mountain View, California  94043
  */
 
-#ifndef lint
+#if 0
 static char sccsid[] = "@(#)rpc_parse.c 1.8 89/02/22 (C) 1987 SMI";
 #endif
 
index 97b2cd041ade84a34bcc743b84f98de8f4452116..ca1203905e991b5bf0dc3162ba4121314f5e7dc9 100644 (file)
@@ -28,7 +28,7 @@
  * Mountain View, California  94043
  */
 
-#ifndef lint
+#if 0
 static char sccsid[] = "@(#)rpc_sample.c  1.1  90/08/30  (C) 1987 SMI";
 
 #endif
index 51eecfee750539023346281e2b8a9cbbe5ce480e..a6f442c3eb9b1555fd82f326609b64af2881f613 100644 (file)
@@ -28,7 +28,7 @@
  * Mountain View, California  94043
  */
 
-#ifndef lint
+#if 0
 static char sccsid[] = "@(#)rpc_scan.c 1.11 89/02/22 (C) 1987 SMI";
 #endif
 
index fa5fb602ab59137c1030a8478f2d270d9eef0b2a..6b33aab262bf2a25bf25c0929f80e35ba6699b0e 100644 (file)
@@ -28,7 +28,7 @@
  * Mountain View, California  94043
  */
 
-#ifndef lint
+#if 0
  static char sccsid[] = "@(#)rpc_svcout.c 1.29 89/03/30 (C) 1987 SMI";
 #endif
 
index 5ce40156b4c8576950af349f29206d2a885ef37e..8d0baa5846a8c37f7a526161d021f478692b3062 100644 (file)
@@ -28,7 +28,7 @@
  * Mountain View, California  94043
  */
 
-#ifndef lint
+#if 0
 static char sccsid[] = "@(#)rpc_tblout.c 1.4 89/02/22 (C) 1988 SMI";
 #endif
 
index 252b181c8fc4c74f3366f1fd06175db663f5f9a1..404966ed42377e04458c091c76d9e4d7685cc7c2 100644 (file)
@@ -28,7 +28,7 @@
  * Mountain View, California  94043
  */
 
-#ifndef lint
+#if 0
 static char sccsid[] = "@(#)rpc_util.c 1.11 89/02/22 (C) 1987 SMI";
 #endif
 
index 5fc7811a8465b3c5be2ce35ef85c628fc639d092..21a1916ded036da2446df0c839012ca042a888d6 100644 (file)
@@ -345,7 +345,9 @@ main(int argc, char **argv)
                errx(1, "Could not find group \"%s\"", nobodygroup);
        nobodygid = gr->gr_gid;
 
+#ifdef HAVE_NFS4_SET_DEBUG
        nfs4_set_debug(verbose, idmapd_warnx);
+#endif
        if (conf_path == NULL)
                conf_path = _PATH_IDMAPDCONF;
        if (nfs4_init_name_mapping(conf_path))
@@ -539,7 +541,8 @@ nfsdcb(int fd, short which, void *data)
        struct idmap_client *ic = data;
        struct idmap_msg im;
        u_char buf[IDMAP_MAXMSGSZ + 1];
-       size_t len, bsiz;
+       size_t len;
+       ssize_t bsiz;
        char *bp, typebuf[IDMAP_MAXMSGSZ],
                buf1[IDMAP_MAXMSGSZ], authbuf[IDMAP_MAXMSGSZ], *p;
        unsigned long tmp;
@@ -556,7 +559,7 @@ nfsdcb(int fd, short which, void *data)
 
        /* Get rid of newline and terminate buffer*/
        buf[len - 1] = '\0';
-       bp = buf;
+       bp = (char *)buf;
 
        memset(&im, 0, sizeof(im));
 
@@ -606,7 +609,7 @@ nfsdcb(int fd, short which, void *data)
        imconv(ic, &im);
 
        buf[0] = '\0';
-       bp = buf;
+       bp = (char *)buf;
        bsiz = sizeof(buf);
 
        /* Authentication name */
index 5285e10d8fbcb85eb199d7fea01c29cc6a19e63d..c57d3b0a326a16adf01c4ee9b083f01df470fab3 100644 (file)
@@ -429,7 +429,7 @@ cache_get_filehandle(nfs_export *exp, int len, char *p)
        if (failed)
                return NULL;
        memset(fh.fh_handle, 0, sizeof(fh.fh_handle));
-       fh.fh_size = qword_get(&bp, fh.fh_handle, NFS3_FHSIZE);
+       fh.fh_size = qword_get(&bp, (char *)fh.fh_handle, NFS3_FHSIZE);
        return &fh;
 }
 
index e402bf822d18849739396d5a091b5f62dee9f19f..c1d18d4cebc9b37b1f227d7de33fe1aaf4ccfaaf 100644 (file)
@@ -35,7 +35,7 @@ extern void my_svc_run(void);
 
 static void            usage(const char *, int exitcode);
 static exports         get_exportlist(void);
-static struct nfs_fh_len *get_rootfh(struct svc_req *, dirpath *, int *, int v3);
+static struct nfs_fh_len *get_rootfh(struct svc_req *, dirpath *, mountstat3 *, int v3);
 
 int new_cache = 0;
 
@@ -346,11 +346,11 @@ mount_mnt_3_svc(struct svc_req *rqstp, dirpath *path, mountres3 *res)
        struct nfs_fh_len *fh;
 
        xlog(D_CALL, "MNT3(%s) called", *path);
-       if ((fh = get_rootfh(rqstp, path, (int *) &res->fhs_status, 1)) != NULL) {
+       if ((fh = get_rootfh(rqstp, path, &res->fhs_status, 1)) != NULL) {
                struct mountres3_ok     *ok = &res->mountres3_u.mountinfo;
 
                ok->fhandle.fhandle3_len = fh->fh_size;
-               ok->fhandle.fhandle3_val = fh->fh_handle;
+               ok->fhandle.fhandle3_val = (char *)fh->fh_handle;
                ok->auth_flavors.auth_flavors_len
                        = sizeof(flavors)/sizeof(flavors[0]);
                ok->auth_flavors.auth_flavors_val = flavors;
@@ -359,7 +359,7 @@ mount_mnt_3_svc(struct svc_req *rqstp, dirpath *path, mountres3 *res)
 }
 
 static struct nfs_fh_len *
-get_rootfh(struct svc_req *rqstp, dirpath *path, int *error, int v3)
+get_rootfh(struct svc_req *rqstp, dirpath *path, mountstat3 *error, int v3)
 {
        struct sockaddr_in *sin =
                (struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
index 034ba792c138e7cd6c2427b8debce2b2c4adb8b1..463bcb55d8c6226d7f68660f28656d89e961eba3 100644 (file)
@@ -1,4 +1,4 @@
-#ifndef lint
+#if 0
 static char sccsid[] = "@(#)nhfsstone.c 1.22 90/05/08 Copyright (c) 1990, Legato Systems Inc";
 #endif
 
@@ -10,6 +10,7 @@ static char sccsid[] = "@(#)nhfsstone.c 1.22 90/05/08 Copyright (c) 1990, Legato
  * Ported to Linux by Olaf Kirch <okir@monad.swb.de>
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -312,7 +313,11 @@ main(int argc, char **argv)
        int pid;                /* process id */
        int delay;              /* msecs since last checked current time */
        int randnum;            /* a random number */
+#if HAVE_SIGPROCMASK
+       sigset_t oldmask;       /* saved signal mask */
+#else
        int oldmask;            /* saved signal mask */
+#endif
        int sampletime;         /* secs between reading kernel stats */
        char *opts;             /* option parsing */
        int pct;
@@ -478,7 +483,20 @@ main(int argc, char **argv)
 
        (void) signal(SIGINT, cleanup);
        (void) signal(SIGUSR1, startup);
+#if HAVE_SIGPROCMASK
+       {
+               sigset_t mask;
+               sigemptyset(&mask);
+               sigaddset(&mask, SIGUSR1);
+               sigprocmask(SIG_BLOCK, &mask, &oldmask);
+       }
+#else
+       /*
+        * sigblock() is marked deprecated in modern
+        * glibc and hence generates a warning.
+        */
        oldmask = sigblock(sigmask(SIGUSR1));
+#endif
 
        if (ncalls == 0) {
                if (runtime == 0) {
@@ -630,7 +648,11 @@ main(int argc, char **argv)
                exit(1);
        }
 
+#if HAVE_SIGPROCMASK
+       sigsuspend(&oldmask);
+#else
        sigpause(oldmask);
+#endif
 
        /*
         * Initialize counters
index 408807ef7da51727a406e7e6ac826730ee5de33c..bf2a92664daf2c9683ac25af1427e1ffe1d2975a 100644 (file)
@@ -29,7 +29,9 @@
 
 static pid_t   mypid;
                                                                /* Turns on logging to console/stderr. */
+#if 0
 static int     opt_debug = 0;  /* Will be command-line option, eventually */
+#endif
 
 void log_init()
 {
index 834847341eb11044a87cd8c99a0b77cffa2169b0..98cbf4a5940ba660bda50aa944f01769b0ee9ea4 100644 (file)
@@ -268,7 +268,9 @@ sm_unmon_1_svc(struct mon_id *argp, struct svc_req *rqstp)
                        clnt = NL_NEXT(clnt);
        }
 
+#ifdef RESTRICTED_STATD
  failure:
+#endif
        note(N_WARNING, "Received erroneous SM_UNMON request from %s for %s",
                my_name, mon_name);
        return (&result);
@@ -336,6 +338,8 @@ sm_unmon_all_1_svc(struct my_id *argp, struct svc_req *rqstp)
                dprintf(N_DEBUG, "SM_UNMON_ALL request from %s with no "
                        "SM_MON requests from it.", my_name);
        }
+#ifdef RESTRICTED_STATD
  failure:
+#endif
        return (&result);
 }
index 7684b3b51eb142b3c7f18e760868cd0575521729..35cbccb54029fabdbb068a366c7d25000bbc4212 100644 (file)
 #include "log.h"
 #include "ha-callout.h"
 
+#if SIZEOF_SOCKLEN_T - 0 == 0
+#define socklen_t int
+#endif
+
 #define MAXMSGSIZE     (2048 / sizeof(unsigned int))
 
 static unsigned long   xid = 0;        /* RPC XID counter */
@@ -278,7 +282,7 @@ recv_rply(int sockfd, struct sockaddr_in *sin, u_long *portp)
        struct rpc_msg          mesg;
        notify_list             *lp = NULL;
        XDR                     xdr, *xdrs = &xdr;
-       int                     alen = sizeof(*sin);
+       socklen_t               alen = sizeof(*sin);
 
        /* Receive message */
        if ((msglen = recvfrom(sockfd, msgbuf, sizeof(msgbuf), 0,
index 8ebb8083b5832545dc4ea2fee9e71a715fbd2d16..c92e12f29c3a72d1c4bb84a9f51b3c8f5e344e61 100644 (file)
@@ -51,7 +51,7 @@ int   run_mode = 0;           /* foreground logging mode */
  * two copies of each - one in main(), one static in log.c... 
  * It also eliminates the 256-char static in log.c */
 char *name_p = NULL;
-char *version_p = NULL;
+const char *version_p = NULL;
 
 /* PRC: a high-availability callout program can be specified with -H
  * When this is done, the program will receive callouts whenever clients
@@ -374,7 +374,7 @@ int main (int argc, char **argv)
 #endif
        
        if (!(run_mode & MODE_NODAEMON)) {
-               int filedes, fdmax, tempfd;
+               int tempfd;
 
                if (pipe(pipefds)<0) {
                        perror("statd: unable to create pipe");
index 225cc8b433b9baf3e4a2b52b3548869a57d46421..ace2ce507043e113ec8c771098ded3c1f107252a 100644 (file)
@@ -88,6 +88,6 @@ extern int run_mode;
  * as to why they're global.
  */
 extern char *name_p;           /* program basename */
-extern char *version_p;                /* program version */
+extern const char *version_p;  /* program version */
 
 extern int             re_notify; /* time to re-read notify list */
index a6a4077718f21d66163ab21a85386f9138591e94..f46dae5d7e343ef1ac94b07bec72a7f056219fa8 100644 (file)
@@ -28,7 +28,6 @@ void
 change_state (void)
 {
   int fd, size;
-  extern short int restart;
   
   if ((fd = open (SM_STAT_PATH, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) == -1)
     die ("open (%s): %s", SM_STAT_PATH, strerror (errno));