Index: util-hurd-0.0.20170102/mboxfs/netfs.c
===================================================================
--- util-hurd-0.0.20170102.orig/mboxfs/netfs.c
+++ util-hurd-0.0.20170102/mboxfs/netfs.c
@@ -64,7 +64,7 @@ extern struct fs_backend backend;
    This call should unlock DIR no matter what.)  */
 error_t
 netfs_attempt_lookup (struct iouser *user, struct node *dir, 
-			      char *name, struct node **np)
+			      const char *name, struct node **np)
 {
   error_t err = 0;
 
@@ -148,7 +148,7 @@ netfs_attempt_read (struct iouser *cred,
    return.  */
 error_t
 netfs_attempt_write (struct iouser *cred, struct node *np,
-			     off_t offset, size_t *len, void *data)
+			     off_t offset, size_t *len, const void *data)
 {
   return EROFS;
 }
@@ -357,7 +357,7 @@ netfs_attempt_syncfs (struct iouser *cre
    CRED. NP is locked.  */
 error_t
 netfs_set_translator (struct iouser *cred, struct node *np,
-    char *argz, size_t argzlen)
+    const char *argz, size_t argzlen)
 {
   return EROFS;
 }
@@ -415,7 +415,7 @@ netfs_attempt_chmod (struct iouser *cred
    (user CRED) into a symlink with target NAME.  */
 error_t
 netfs_attempt_mksymlink (struct iouser *cred, struct node *np,
-				 char *name)
+				 const char *name)
 {
   return EPERM;
 }
@@ -444,7 +444,7 @@ netfs_attempt_chflags (struct iouser *cr
    locked) for USER.  */
 error_t
 netfs_attempt_unlink (struct iouser *user, struct node *dir,
-			      char *name)
+			      const char *name)
 {
   return EROFS;
 }
@@ -454,8 +454,8 @@ netfs_attempt_unlink (struct iouser *use
    are locked.  */
 error_t
 netfs_attempt_rename (struct iouser *user, struct node *fromdir,
-			      char *fromname, struct node *todir, 
-			      char *toname, int excl)
+			      const char *fromname, struct node *todir, 
+			      const char *toname, int excl)
 {
   return EROFS;
 }
@@ -465,7 +465,7 @@ netfs_attempt_rename (struct iouser *use
    MODE. */
 error_t
 netfs_attempt_mkdir (struct iouser *user, struct node *dir,
-			     char *name, mode_t mode)
+			     const char *name, mode_t mode)
 {
   return EROFS;
 }
@@ -475,7 +475,7 @@ netfs_attempt_mkdir (struct iouser *user
    named NAME in DIR (which is locked) for USER.  */
 error_t
 netfs_attempt_rmdir (struct iouser *user, 
-			     struct node *dir, char *name)
+			     struct node *dir, const char *name)
 {
   return EROFS;
 }
@@ -487,7 +487,7 @@ netfs_attempt_rmdir (struct iouser *user
    NAME is already found in DIR.  */
 error_t
 netfs_attempt_link (struct iouser *user, struct node *dir,
-			    struct node *file, char *name, int excl)
+			    struct node *file, const char *name, int excl)
 {
   return EROFS;
 }
@@ -510,7 +510,7 @@ netfs_attempt_mkfile (struct iouser *use
    locked on success; no matter what, unlock DIR before returning.  */
 error_t
 netfs_attempt_create_file (struct iouser *user, struct node *dir,
-				   char *name, mode_t mode, struct node **np)
+				   const char *name, mode_t mode, struct node **np)
 {
   *np = NULL;
   pthread_mutex_unlock (&dir->lock);
@@ -533,7 +533,7 @@ netfs_append_args (char **argz, unsigned
    returned if some option is unrecognized.  The default definition of this
    routine will parse them using NETFS_RUNTIME_ARGP. */
 error_t
-netfs_set_options (char *argz, size_t argz_len)
+netfs_set_options (const char *argz, size_t argz_len)
 {
   error_t err = EINVAL;
   if (backend.set_options)
Index: util-hurd-0.0.20170102/mboxfs/backend.h
===================================================================
--- util-hurd-0.0.20170102.orig/mboxfs/backend.h
+++ util-hurd-0.0.20170102/mboxfs/backend.h
@@ -63,7 +63,7 @@ struct fs_backend
   error_t (*get_args)(char **argz, unsigned *argz_len);
 
   /* Set options (see netfs_set_options()). */
-  error_t (*set_options)(char *argz, size_t argz_len);
+  error_t (*set_options)(const char *argz, size_t argz_len);
 
 
   /* 
Index: util-hurd-0.0.20170102/mboxfs/fs.c
===================================================================
--- util-hurd-0.0.20170102.orig/mboxfs/fs.c
+++ util-hurd-0.0.20170102/mboxfs/fs.c
@@ -461,9 +461,10 @@ fs_get_path_from_root (struct node *root
     if (strlen (path) + strlen (n->nn->name) + 1 + 1 > len)
     {
       char* new;
+      size_t offset = ptr - path;
       len *= 2;
       new = realloc (path, len);
-      ptr = new + (ptr - path);
+      ptr = new + offset;
       path = new;
     }
     REVERSE_COPY (ptr, n->nn->name);
@@ -507,9 +508,10 @@ fs_get_path_to_root (struct node *root,
     if (strlen (path) + 3 + 1 > len)
     {
       char* new;
+      size_t offset = ptr - path;
       len *= 2;
       new = realloc (path, len);
-      ptr = new + (ptr - path);
+      ptr = new + offset;
       path = new;
     }
     strncpy (ptr, "../", 3);
Index: util-hurd-0.0.20170102/mboxfs/mboxfs.c
===================================================================
--- util-hurd-0.0.20170102.orig/mboxfs/mboxfs.c
+++ util-hurd-0.0.20170102/mboxfs/mboxfs.c
@@ -141,7 +141,7 @@ mboxfs_get_args (char **argz, unsigned *
  * sense when mboxfs is already running).
  */
 error_t
-mboxfs_set_options (char *argz, size_t argz_len)
+mboxfs_set_options (const char *argz, size_t argz_len)
 {
   /* FIXME:
    * Changing the show_headers flag implies an st_size modification, which
@@ -500,6 +500,7 @@ read_mbox (void *foo)
   if (mbox_open_mailbox (&main_context) != 0)
     error (1, 0, "Provided mailbox could not be parsed (%s, type %s).",
 	   main_context.path, mboxfs_options.force_mmdf ? "MMDF" : "MBOX");
+  return NULL;
 }
 
 error_t
Index: util-hurd-0.0.20170102/cvsfs/netfs.c
===================================================================
--- util-hurd-0.0.20170102.orig/cvsfs/netfs.c
+++ util-hurd-0.0.20170102/cvsfs/netfs.c
@@ -97,7 +97,7 @@ error_t netfs_attempt_readlink (struct i
    locked on success; no matter what, unlock DIR before returning.  */
 error_t
 netfs_attempt_create_file (struct iouser *user, struct node *dir,
-			   char *name, mode_t mode, struct node **node)
+			   const char *name, mode_t mode, struct node **node)
 {
   (void) user;
   (void) mode;
@@ -145,7 +145,7 @@ netfs_attempt_statfs (struct iouser *cre
 /* Attempt to create a new directory named NAME in DIR for USER with mode
    MODE.  */
 error_t netfs_attempt_mkdir (struct iouser *user, struct node *dir,
-			     char *name, mode_t mode)
+			     const char *name, mode_t mode)
 {
   (void) user;
   (void) dir;
@@ -267,7 +267,7 @@ netfs_attempt_sync (struct iouser *cred,
 
 /* Delete NAME in DIR for USER. */
 error_t netfs_attempt_unlink (struct iouser *user, struct node *dir,
-			      char *name)
+			      const char *name)
 {
   (void) user;
 
@@ -338,7 +338,7 @@ netfs_report_access (struct iouser *cred
    (*NODE, if found, should be locked, this call should unlock DIR no matter
    what.) */
 error_t netfs_attempt_lookup (struct iouser *user, struct node *dir,
-			      char *name, struct node **node)
+			      const char *name, struct node **node)
 {
   (void) user;
 
@@ -467,7 +467,7 @@ error_t netfs_attempt_lookup (struct iou
    DIR nor FILE are locked.  If EXCL is set, do not delete the target, but
    return EEXIST if NAME is already found in DIR.  */
 error_t netfs_attempt_link (struct iouser *user, struct node *dir,
-			    struct node *file, char *name, int excl)
+			    struct node *file, const char *name, int excl)
 {
   (void) user;
   (void) dir;
@@ -482,7 +482,7 @@ error_t netfs_attempt_link (struct iouse
 
 /* Attempt to remove directory named NAME in DIR for USER. */
 error_t netfs_attempt_rmdir (struct iouser *user,
-			     struct node *dir, char *name)
+			     struct node *dir, const char *name)
 {
   (void) user;
 
@@ -509,7 +509,7 @@ error_t netfs_attempt_chauthor (struct i
 
 /* Attempt to turn NODE (user CRED) into a symlink with target NAME. */
 error_t netfs_attempt_mksymlink (struct iouser *cred, struct node *node,
-				 char *name)
+				 const char *name)
 {
   (void) cred;
   (void) name;
@@ -522,8 +522,8 @@ error_t netfs_attempt_mksymlink (struct
 
 /* Note that in this one call, neither of the specific nodes are locked. */
 error_t netfs_attempt_rename (struct iouser *user, struct node *fromdir,
-			      char *fromname, struct node *todir,
-			      char *toname, int excl)
+			      const char *fromname, struct node *todir,
+			      const char *toname, int excl)
 {
   (void) user;
   (void) fromdir;
@@ -542,7 +542,7 @@ error_t netfs_attempt_rename (struct iou
    to *LEN bytes from DATA.  Set *LEN to the amount seccessfully written upon
    return. */
 error_t netfs_attempt_write (struct iouser *cred, struct node *node,
-			     loff_t offset, size_t *len, void *data)
+			     loff_t offset, size_t *len, const void *data)
 {
   (void) cred;
   (void) offset;
Index: util-hurd-0.0.20170102/memfs/memfs.c
===================================================================
--- util-hurd-0.0.20170102.orig/memfs/memfs.c
+++ util-hurd-0.0.20170102/memfs/memfs.c
@@ -209,11 +209,11 @@ trivfs_S_io_readable (struct trivfs_prot
 /* Read data from an IO object.  If OFFSet is -1, read from the object
    maintained file pointer.  If the object is not seekable, OFFSet is
    ignored.  The amount desired to be read is in AMOUNT.  */
-error_t
+kern_return_t
 trivfs_S_io_read (struct trivfs_protid *cred,
 		  mach_port_t reply, mach_msg_type_name_t reply_type,
 		  data_t *data, mach_msg_type_number_t *data_len,
-		  off_t offs, mach_msg_type_number_t amount)
+		  off_t offs, vm_size_t amount)
 {
   struct open *op;
 
@@ -277,10 +277,10 @@ trivfs_S_io_read (struct trivfs_protid *
    object at a time; servers implement congestion control by delaying
    responses to io_write.  Servers may drop data (returning ENOBUFS)
    if they receive more than one write when not prepared for it.  */
-error_t
+kern_return_t
 trivfs_S_io_write (struct trivfs_protid *cred,
 		   mach_port_t reply, mach_msg_type_name_t reply_type,
-		   data_t data, mach_msg_type_number_t data_len,
+		   const_data_t data, mach_msg_type_number_t data_len,
 		   off_t offs, mach_msg_type_number_t *amount)
 {
   struct open *op;
@@ -351,7 +351,7 @@ trivfs_S_io_write (struct trivfs_protid
    The new offset is returned in *NEW_OFFS.  It is not possible to
    seek at locations < 0 or >= CONTENTS_LEN.  Doing so will result
    in OFFset being silently adjusted to 0 or CONTENTS_LEN.  */
-error_t
+kern_return_t
 trivfs_S_io_seek (struct trivfs_protid *cred,
 		  mach_port_t reply, mach_msg_type_name_t reply_type,
 		  off_t offs, int whence, off_t *new_offs)
Index: util-hurd-0.0.20170102/smbfs/smbnetfs.c
===================================================================
--- util-hurd-0.0.20170102.orig/smbfs/smbnetfs.c
+++ util-hurd-0.0.20170102/smbfs/smbnetfs.c
@@ -177,7 +177,7 @@ create_root_node ()
 
 /* Add FILENAME in directory TOP and set *NN to the resulting node.  */
 static error_t
-add_node (char *filename, struct node *top, struct netnode **nn)
+add_node (const char *filename, struct node *top, struct netnode **nn)
 {
   int err;
   struct netnode *n;
@@ -270,7 +270,7 @@ netfs_attempt_chmod (struct iouser * cre
 }
 
 error_t
-netfs_attempt_mksymlink (struct iouser * cred, struct node * np, char *name)
+netfs_attempt_mksymlink (struct iouser * cred, struct node * np, const char *name)
 {
   return EOPNOTSUPP;
 }
@@ -282,7 +282,7 @@ netfs_attempt_mkdev (struct iouser * cre
 }
 
 error_t
-netfs_set_translator (struct iouser * cred, struct node * np, char *argz,size_t argzlen)
+netfs_set_translator (struct iouser * cred, struct node * np, const char *argz,size_t argzlen)
 {
   return 0;
 }
@@ -362,7 +362,7 @@ netfs_attempt_syncfs (struct iouser * cr
 }
 
 error_t
-netfs_attempt_lookup (struct iouser * user, struct node * dir, char *name,
+netfs_attempt_lookup (struct iouser * user, struct node * dir, const char *name,
 		      struct node ** np)
 {
   struct netnode *n;
@@ -414,7 +414,7 @@ netfs_attempt_lookup (struct iouser * us
 }
 
 error_t
-netfs_attempt_unlink (struct iouser * user, struct node * dir, char *name)
+netfs_attempt_unlink (struct iouser * user, struct node * dir, const char *name)
 {
   char *filename;
 
@@ -437,7 +437,7 @@ netfs_attempt_unlink (struct iouser * us
 
 error_t
 netfs_attempt_rename (struct iouser * user, struct node * fromdir,
-		      char *fromname, struct node * todir, char *toname,
+		      const char *fromname, struct node * todir, const char *toname,
 		      int excl)
 {
   char *filename;		/* Origin file name.  */
@@ -464,7 +464,7 @@ netfs_attempt_rename (struct iouser * us
 }
 
 error_t
-netfs_attempt_mkdir (struct iouser * user, struct node * dir, char *name,
+netfs_attempt_mkdir (struct iouser * user, struct node * dir, const char *name,
 		     mode_t mode)
 {
   char *filename;
@@ -483,7 +483,7 @@ netfs_attempt_mkdir (struct iouser * use
 }
 
 error_t
-netfs_attempt_rmdir (struct iouser * user, struct node * dir, char *name)
+netfs_attempt_rmdir (struct iouser * user, struct node * dir, const char *name)
 {
   char *filename;
   error_t err;
@@ -502,7 +502,7 @@ netfs_attempt_rmdir (struct iouser * use
 
 error_t
 netfs_attempt_link (struct iouser * user, struct node * dir,
-		    struct node * file, char *name, int excl)
+		    struct node * file, const char *name, int excl)
 {
   return EOPNOTSUPP;
 }
@@ -517,7 +517,7 @@ netfs_attempt_mkfile (struct iouser * us
 
 error_t
 netfs_attempt_create_file (struct iouser * user, struct node * dir,
-			   char *name, mode_t mode, struct node ** np)
+			   const char *name, mode_t mode, struct node ** np)
 {
   error_t err = 0;
   char *filename;
@@ -637,7 +637,7 @@ netfs_attempt_read (struct iouser * cred
 
 error_t
 netfs_attempt_write (struct iouser * cred, struct node * np, loff_t offset,
-		     size_t * len, void *data)
+		     size_t * len, const void *data)
 {
   int ret = 0;
   int fd;
Index: util-hurd-0.0.20170102/socketio/socketio.c
===================================================================
--- util-hurd-0.0.20170102.orig/socketio/socketio.c
+++ util-hurd-0.0.20170102/socketio/socketio.c
@@ -701,7 +701,7 @@ netfs_S_dir_lookup (struct protid *dirus
    This call should unlock DIR no matter what.)  */
 error_t
 netfs_attempt_lookup (struct iouser *user, struct node *dir,
-		      char *name, struct node **node)
+		      const char *name, struct node **node)
 {
   /* Not used.  */
   return EIEIO;
@@ -827,7 +827,7 @@ netfs_attempt_chmod (struct iouser *cred
    target NAME.  */
 error_t
 netfs_attempt_mksymlink (struct iouser *cred, struct node *np,
-			 char *name)
+			 const char *name)
 {
   return EOPNOTSUPP;
 }
@@ -847,7 +847,7 @@ netfs_attempt_mkdev (struct iouser *cred
    length ARGZLEN) for user CRED. NP is locked.  */
 error_t
 netfs_set_translator (struct iouser *cred, struct node *np,
-		      char *argz, size_t argzlen)
+		      const char *argz, size_t argzlen)
 {
   return EOPNOTSUPP;
 }
@@ -928,7 +928,7 @@ netfs_attempt_syncfs (struct iouser *cre
 /* Delete NAME in DIR (which is locked) for USER.  */
 error_t
 netfs_attempt_unlink (struct iouser *user, struct node *dir,
-		      char *name)
+		      const char *name)
 {
   return EOPNOTSUPP;
 }
@@ -938,8 +938,8 @@ netfs_attempt_unlink (struct iouser *use
    of the specific nodes are locked.  */
 error_t
 netfs_attempt_rename (struct iouser *user, struct node *fromdir,
-		      char *fromname, struct node *todir, 
-		      char *toname, int excl)
+		      const char *fromname, struct node *todir, 
+		      const char *toname, int excl)
 {
   return EOPNOTSUPP;
 }
@@ -949,7 +949,7 @@ netfs_attempt_rename (struct iouser *use
    locked) for USER with mode MODE. */
 error_t
 netfs_attempt_mkdir (struct iouser *user, struct node *dir,
-		     char *name, mode_t mode)
+		     const char *name, mode_t mode)
 {
   return EOPNOTSUPP;
 }
@@ -959,7 +959,7 @@ netfs_attempt_mkdir (struct iouser *user
    USER.  */
 error_t
 netfs_attempt_rmdir (struct iouser *user, 
-		     struct node *dir, char *name)
+		     struct node *dir, const char *name)
 {
   return EOPNOTSUPP;
 }
@@ -970,7 +970,7 @@ netfs_attempt_rmdir (struct iouser *user
    target.  Return EEXIST if NAME is already found in DIR.  */
 error_t
 netfs_attempt_link (struct iouser *user, struct node *dir,
-		    struct node *file, char *name, int excl)
+		    struct node *file, const char *name, int excl)
 {
   return EOPNOTSUPP;
 }
@@ -993,7 +993,7 @@ netfs_attempt_mkfile (struct iouser *use
    on success; no matter what, unlock DIR before returning.  */
 error_t
 netfs_attempt_create_file (struct iouser *user, struct node *dir,
-			   char *name, mode_t mode, struct node **np)
+			   const char *name, mode_t mode, struct node **np)
 {
   *np = 0;
   pthread_mutex_unlock (&dir->lock);
@@ -1044,7 +1044,7 @@ netfs_attempt_read (struct iouser *cred,
    successfully written upon return.  */
 error_t
 netfs_attempt_write (struct iouser *cred, struct node *np,
-		     off_t offset, size_t *len, void *data)
+		     off_t offset, size_t *len, const void *data)
 {
   return EOPNOTSUPP;
 }
@@ -1075,9 +1075,9 @@ netfs_node_norefs (struct node *np)
   struct references result;
 
   node_uninstall (np);
-  node_destroy (np);
   if (np->nn->flags & PROTOCOL_NODE)
     refcounts_demote (&dir->refcounts, &result);
+  node_destroy (np);
 }
 
 
Index: util-hurd-0.0.20170102/tarfs/netfs.c
===================================================================
--- util-hurd-0.0.20170102.orig/tarfs/netfs.c
+++ util-hurd-0.0.20170102/tarfs/netfs.c
@@ -48,7 +48,7 @@ extern struct fs_backend backend;
    This call should unlock DIR no matter what.)  */
 error_t
 netfs_attempt_lookup (struct iouser *user, struct node *dir, 
-		      char *name, struct node **np)
+		      const char *name, struct node **np)
 {
   error_t err = 0;
 
@@ -142,7 +142,7 @@ netfs_attempt_read (struct iouser *cred,
    return.  */
 error_t
 netfs_attempt_write (struct iouser *cred, struct node *np,
-			     loff_t offset, size_t *len, void *data)
+			     loff_t offset, size_t *len, const void *data)
 {
   if (! backend.write_node)
     return EROFS;
@@ -440,7 +440,7 @@ netfs_attempt_syncfs (struct iouser *cre
    CRED. NP is locked.  */
 error_t
 netfs_set_translator (struct iouser *cred, struct node *np,
-    char *argz, size_t argzlen)
+    const char *argz, size_t argzlen)
 {
   return EOPNOTSUPP;
 }
@@ -574,7 +574,7 @@ netfs_attempt_chmod (struct iouser *cred
    (user CRED) into a symlink with target NAME.  */
 error_t
 netfs_attempt_mksymlink (struct iouser *cred, struct node *np,
-			 char *name)
+			 const char *name)
 {
   error_t err;
 
@@ -629,7 +629,7 @@ netfs_attempt_chflags (struct iouser *cr
    locked) for USER.  */
 error_t
 netfs_attempt_unlink (struct iouser *user, struct node *dir,
-		      char *name)
+		      const char *name)
 {
   error_t err;
 
@@ -666,8 +666,8 @@ netfs_attempt_unlink (struct iouser *use
    are locked.  */
 error_t
 netfs_attempt_rename (struct iouser *user, struct node *fromdir,
-			      char *fromname, struct node *todir, 
-			      char *toname, int excl)
+			      const char *fromname, struct node *todir, 
+			      const char *toname, int excl)
 {
   debug (("FIXME: Not implemented"));
   return EOPNOTSUPP;
@@ -678,7 +678,7 @@ netfs_attempt_rename (struct iouser *use
    MODE. */
 error_t
 netfs_attempt_mkdir (struct iouser *user, struct node *dir,
-		     char *name, mode_t mode)
+		     const char *name, mode_t mode)
 {
   error_t err = fshelp_isowner (&dir->nn_stat, user);
   struct node *newdir;
@@ -695,7 +695,7 @@ netfs_attempt_mkdir (struct iouser *user
 /* The user must define this function.  Attempt to remove directory
    named NAME in DIR (which is locked) for USER.  */
 error_t
-netfs_attempt_rmdir (struct iouser *user, struct node *dir, char *name)
+netfs_attempt_rmdir (struct iouser *user, struct node *dir, const char *name)
 {
   /* Simply redirect the call */
   return netfs_attempt_unlink (user, dir, name);
@@ -708,7 +708,7 @@ netfs_attempt_rmdir (struct iouser *user
    NAME is already found in DIR.  */
 error_t
 netfs_attempt_link (struct iouser *user, struct node *dir,
-		    struct node *file, char *name, int excl)
+		    struct node *file, const char *name, int excl)
 {
   error_t err;
 
@@ -743,7 +743,7 @@ netfs_attempt_mkfile (struct iouser *use
    locked on success; no matter what, unlock DIR before returning.  */
 error_t
 netfs_attempt_create_file (struct iouser *user, struct node *dir,
-			   char *name, mode_t mode, struct node **np)
+			   const char *name, mode_t mode, struct node **np)
 {
   error_t err = fshelp_isowner (&dir->nn_stat, user);
 
@@ -792,7 +792,7 @@ netfs_append_args (char **argz, unsigned
    returned if some option is unrecognized.  The default definition of this
    routine will parse them using NETFS_RUNTIME_ARGP. */
 error_t
-netfs_set_options (char *argz, size_t argz_len)
+netfs_set_options (const char *argz, size_t argz_len)
 {
   error_t err = EINVAL;
 
Index: util-hurd-0.0.20170102/tarfs/tarfs.c
===================================================================
--- util-hurd-0.0.20170102.orig/tarfs/tarfs.c
+++ util-hurd-0.0.20170102/tarfs/tarfs.c
@@ -269,7 +269,7 @@ tarfs_get_args (char **argz, unsigned *a
    fsysopts): for instance, --no-timeout won't work (it doesn't make
    sense when tarfs is already running).  */
 error_t
-tarfs_set_options (char *argz, size_t argz_len)
+tarfs_set_options (const char *argz, size_t argz_len)
 {
   error_t err = 0;
 
@@ -319,7 +319,7 @@ tarfs_set_options (char *argz, size_t ar
 
 
 error_t tarfs_create_node (struct node **newnode, struct node *dir,
-			   char *name, mode_t mode);
+			   const char *name, mode_t mode);
 
 /* This function is called every time a header has been successfully parsed.
    It simply creates the node corresponding to the header.
@@ -768,7 +768,7 @@ tarfs_read_node (struct node *node, off_
 
 /* Write to NODE through its cache.  */
 error_t
-tarfs_write_node (struct node *node, off_t offset, size_t *len, void *data)
+tarfs_write_node (struct node *node, off_t offset, size_t *len, const void *data)
 {
   IF_RWFS;
 
@@ -828,7 +828,7 @@ tarfs_change_stat (struct node *node, co
    it will point to the new node.  NAME is duplicated.  */
 error_t
 tarfs_create_node (struct node **newnode, struct node *dir,
-		   char *name, mode_t mode)
+		   const char *name, mode_t mode)
 {
   error_t err;
   struct node *new = NULL;
@@ -931,7 +931,7 @@ tarfs_free_node (struct node *node)
 /* Tries to create a hard link named NAME in DIR to file NODE.  */
 error_t
 tarfs_link_node (struct node *dir, struct node *target,
-		 char *name, int excl)
+		 const char *name, int excl)
 {
   error_t err = 0;
   struct tar_item *prev_tar, *tar;
Index: util-hurd-0.0.20170102/xmlfs/netfs.c
===================================================================
--- util-hurd-0.0.20170102.orig/xmlfs/netfs.c
+++ util-hurd-0.0.20170102/xmlfs/netfs.c
@@ -75,7 +75,7 @@ netfs_attempt_chmod (struct iouser *cred
    (user CRED) into a symlink with target NAME.  */
 error_t
 netfs_attempt_mksymlink (struct iouser *cred, struct node *np,
-			 char *name)
+			 const char *name)
 {
   return EROFS;
 }
@@ -144,7 +144,7 @@ netfs_attempt_syncfs (struct iouser *cre
    This call should unlock DIR no matter what.)  */
 error_t 
 netfs_attempt_lookup (struct iouser *user, struct node *dir,
-                              char *name, struct node **np)
+                              const char *name, struct node **np)
 {
   struct node *nd;
   error_t err;
@@ -213,7 +213,7 @@ netfs_attempt_lookup (struct iouser *use
 /* Delete NAME in DIR (which is locked) for USER.  */
 error_t
 netfs_attempt_unlink (struct iouser *user, struct node *dir,
-                              char *name)
+                              const char *name)
 {
   return EROFS;
 }
@@ -222,22 +222,22 @@ netfs_attempt_unlink (struct iouser *use
 of the specific nodes are locked.  */
 error_t 
 netfs_attempt_rename (struct iouser *user, struct node *fromdir,
-                              char *fromname, struct node *todir,
-                              char *toname, int excl)
+                              const char *fromname, struct node *todir,
+                              const char *toname, int excl)
 {
   return EROFS;
 }
 /* Attempt to create a new directory named NAME in DIR (which is locked)
    for USER with mode MODE. */
 error_t netfs_attempt_mkdir (struct iouser *user, struct node *dir,
-                             char *name, mode_t mode)
+                             const char *name, mode_t mode)
 {
   return EROFS;
 }
 /* Attempt to remove directory named NAME in DIR (which is locked) for
  USER.  */
 error_t netfs_attempt_rmdir (struct iouser *user,
-                             struct node *dir, char *name)
+                             struct node *dir, const char *name)
 {
   return EROFS;
 }
@@ -246,7 +246,7 @@ error_t netfs_attempt_rmdir (struct ious
    neither DIR nor FILE are locked. If EXCL is set, do not delete 
    the target.  Return EEXIST if NAME is already found in DIR.  */
 error_t netfs_attempt_link (struct iouser *user, struct node *dir,
-                            struct node *file, char *name, int excl)
+                            struct node *file, const char *name, int excl)
 {
   return EROFS;
 }
@@ -268,7 +268,7 @@ error_t netfs_attempt_mkfile (struct iou
 
 error_t 
 netfs_attempt_create_file (struct iouser *user, struct node *dir,
-			   char *name, mode_t mode, struct node **np)
+			   const char *name, mode_t mode, struct node **np)
 {
   return EROFS;
 }
@@ -367,7 +367,7 @@ error_t netfs_attempt_read (struct iouse
    for up to *LEN bytes from DATA.  Set *LEN to the amount successfully written
    upon return.  */
 error_t netfs_attempt_write (struct iouser *cred, struct node *np,
-			     loff_t offset, size_t *len, void *data)
+			     loff_t offset, size_t *len, const void *data)
 {
   return EROFS;
 }
Index: util-hurd-0.0.20170102/filter/filter.c
===================================================================
--- util-hurd-0.0.20170102.orig/filter/filter.c
+++ util-hurd-0.0.20170102/filter/filter.c
@@ -79,7 +79,7 @@ char *target_name = NULL;
 error_t
   netfs_attempt_create_file
   (struct iouser *user,
-   struct node *dir, char *name, mode_t mode, struct node **node)
+   struct node *dir, const char *name, mode_t mode, struct node **node)
 {
   LOG_MSG ("netfs_attempt_create_file");
 
@@ -225,7 +225,7 @@ error_t
 /*Looks up `name` under `dir` for `user`*/
 error_t
   netfs_attempt_lookup
-  (struct iouser * user, struct node * dir, char *name, struct node ** node)
+  (struct iouser * user, struct node * dir, const char *name, struct node ** node)
 {
   LOG_MSG ("netfs_attempt_lookup: '%s'", name);
 
@@ -237,7 +237,7 @@ error_t
 /*---------------------------------------------------------------------------*/
 /*Deletes `name` in `dir` for `user`*/
 error_t
-  netfs_attempt_unlink (struct iouser * user, struct node * dir, char *name)
+  netfs_attempt_unlink (struct iouser * user, struct node * dir, const char *name)
 {
   LOG_MSG ("netfs_attempt_unlink");
 
@@ -250,7 +250,7 @@ error_t
   netfs_attempt_rename
   (struct iouser * user,
    struct node * fromdir,
-   char *fromname, struct node * todir, char *toname, int excl)
+   const char *fromname, struct node * todir, const char *toname, int excl)
 {
   LOG_MSG ("netfs_attempt_rename");
 
@@ -262,7 +262,7 @@ error_t
 /*Attempts to create a new directory*/
 error_t
   netfs_attempt_mkdir
-  (struct iouser * user, struct node * dir, char *name, mode_t mode)
+  (struct iouser * user, struct node * dir, const char *name, mode_t mode)
 {
   LOG_MSG ("netfs_attempt_mkdir");
 
@@ -272,7 +272,7 @@ error_t
 /*---------------------------------------------------------------------------*/
 /*Attempts to remove directory `name` in `dir` for `user`*/
 error_t
-  netfs_attempt_rmdir (struct iouser * user, struct node * dir, char *name)
+  netfs_attempt_rmdir (struct iouser * user, struct node * dir, const char *name)
 {
   LOG_MSG ("netfs_attempt_rmdir");
 
@@ -318,7 +318,7 @@ error_t
 /*Attempts to turn `node` into a symlink targetting `name`*/
 error_t
   netfs_attempt_mksymlink
-  (struct iouser * cred, struct node * node, char *name)
+  (struct iouser * cred, struct node * node, const char *name)
 {
   LOG_MSG ("netfs_attempt_mksymlink");
 
@@ -343,7 +343,7 @@ error_t
 /*Attempts to set the passive translator record for `file` passing `argz`*/
 error_t
   netfs_set_translator
-  (struct iouser * cred, struct node * node, char *argz, size_t arglen)
+  (struct iouser * cred, struct node * node, const char *argz, size_t arglen)
 {
   LOG_MSG ("netfs_set_translator");
 
@@ -401,7 +401,7 @@ error_t netfs_attempt_syncfs (struct iou
 error_t
   netfs_attempt_link
   (struct iouser * user,
-   struct node * dir, struct node * file, char *name, int excl)
+   struct node * dir, struct node * file, const char *name, int excl)
 {
   LOG_MSG ("netfs_attempt_link");
 
@@ -472,7 +472,7 @@ error_t
 error_t
   netfs_attempt_write
   (struct iouser * cred,
-   struct node * node, loff_t offset, size_t * len, void *data)
+   struct node * node, loff_t offset, size_t * len, const void *data)
 {
   LOG_MSG ("netfs_attempt_write");
 
Index: util-hurd-0.0.20170102/filter/filter.h
===================================================================
--- util-hurd-0.0.20170102.orig/filter/filter.h
+++ util-hurd-0.0.20170102/filter/filter.h
@@ -66,7 +66,7 @@ extern io_statbuf_t underlying_node_stat
 error_t
   netfs_attempt_create_file
   (struct iouser *user,
-   struct node *dir, char *name, mode_t mode, struct node **node);
+   struct node *dir, const char *name, mode_t mode, struct node **node);
 /*---------------------------------------------------------------------------*/
 /*Returns an error if the process of opening a file should not be
   allowed to complete because of insufficient permissions*/
@@ -104,27 +104,27 @@ error_t
 /*Looks up `name` under `dir` for `user`*/
 error_t
   netfs_attempt_lookup
-  (struct iouser *user, struct node *dir, char *name, struct node **node);
+  (struct iouser *user, struct node *dir, const char *name, struct node **node);
 /*---------------------------------------------------------------------------*/
 /*Deletes `name` in `dir` for `user`*/
 error_t
-  netfs_attempt_unlink (struct iouser *user, struct node *dir, char *name);
+  netfs_attempt_unlink (struct iouser *user, struct node *dir, const char *name);
 /*---------------------------------------------------------------------------*/
 /*Attempts to rename `fromdir`/`fromname` to `todir`/`toname`*/
 error_t
   netfs_attempt_rename
   (struct iouser *user,
    struct node *fromdir,
-   char *fromname, struct node *todir, char *toname, int excl);
+   const char *fromname, struct node *todir, const char *toname, int excl);
 /*---------------------------------------------------------------------------*/
 /*Attempts to create a new directory*/
 error_t
   netfs_attempt_mkdir
-  (struct iouser *user, struct node *dir, char *name, mode_t mode);
+  (struct iouser *user, struct node *dir, const char *name, mode_t mode);
 /*---------------------------------------------------------------------------*/
 /*Attempts to remove directory `name` in `dir` for `user`*/
 error_t
-  netfs_attempt_rmdir (struct iouser *user, struct node *dir, char *name);
+  netfs_attempt_rmdir (struct iouser *user, struct node *dir, const char *name);
 /*---------------------------------------------------------------------------*/
 /*Attempts to change the owner of `node` for user `cred` to `uid`:`gid`*/
 error_t
@@ -143,7 +143,7 @@ error_t
 /*Attempts to turn `node` into a symlink targetting `name`*/
 error_t
   netfs_attempt_mksymlink
-  (struct iouser *cred, struct node *node, char *name);
+  (struct iouser *cred, struct node *node, const char *name);
 /*---------------------------------------------------------------------------*/
 /*Attempts to turn `node` into a device; type can be either S_IFBLK or
   S_IFCHR*/
@@ -154,7 +154,7 @@ error_t
 /*Attempts to set the passive translator record for `file` passing `argz`*/
 error_t
   netfs_set_translator
-  (struct iouser *cred, struct node *node, char *argz, size_t arglen);
+  (struct iouser *cred, struct node *node, const char *argz, size_t arglen);
 /*---------------------------------------------------------------------------*/
 /*Attempts to call chflags for `node`*/
 error_t
@@ -177,7 +177,7 @@ error_t netfs_attempt_syncfs (struct iou
 error_t
   netfs_attempt_link
   (struct iouser *user,
-   struct node *dir, struct node *file, char *name, int excl);
+   struct node *dir, struct node *file, const char *name, int excl);
 /*---------------------------------------------------------------------------*/
 /*Attempts to create an anonymous file related to `dir` with `mode`*/
 error_t
@@ -198,7 +198,7 @@ error_t
 error_t
   netfs_attempt_write
   (struct iouser *cred,
-   struct node *node, loff_t offset, size_t * len, void *data);
+   struct node *node, loff_t offset, size_t * len, const void *data);
 /*---------------------------------------------------------------------------*/
 /*Frees all storage associated with the node*/
 void netfs_node_norefs (struct node *np);
Index: util-hurd-0.0.20170102/httpfs/netfs.c
===================================================================
--- util-hurd-0.0.20170102.orig/httpfs/netfs.c
+++ util-hurd-0.0.20170102/httpfs/netfs.c
@@ -40,7 +40,7 @@
    locked on success; no matter what, unlock DIR before returning.  */
 error_t
 netfs_attempt_create_file (struct iouser *user, struct node *dir,
-													 char *name, mode_t mode, struct node **node)
+													 const char *name, mode_t mode, struct node **node)
 {
 	*node = NULL;
 	pthread_mutex_unlock (&dir->lock);
@@ -258,7 +258,7 @@ netfs_get_dirents (struct iouser *cred,
    (*NODE, if found, should be locked, this call should unlock DIR no matter
    what.) */
 error_t netfs_attempt_lookup (struct iouser *user, struct node *dir,
-			char *name, struct node ** node)
+			const char *name, struct node ** node)
 {
 	error_t err;
 	struct node *nd;
@@ -309,15 +309,15 @@ error_t netfs_attempt_lookup (struct iou
 
 /* Delete NAME in DIR for USER. */
 error_t netfs_attempt_unlink (struct iouser *user, struct node *dir,
-         	              char *name)
+         	              const char *name)
 {
 	return EROFS;
 }
 
 /* Note that in this one call, neither of the specific nodes are locked. */
 error_t netfs_attempt_rename (struct iouser *user, struct node *fromdir,
-		char *fromname, struct node *todir,
-		char *toname, int excl)
+		const char *fromname, struct node *todir,
+		const char *toname, int excl)
 {
 	return EROFS;
 }
@@ -325,14 +325,14 @@ error_t netfs_attempt_rename (struct iou
 /* Attempt to create a new directory named NAME in DIR for USER with mode
    MODE.  */
 error_t netfs_attempt_mkdir (struct iouser *user, struct node *dir,
-			     char *name, mode_t mode)
+			     const char *name, mode_t mode)
 {
 	return EROFS;
 }
 
 /* Attempt to remove directory named NAME in DIR for USER. */
 error_t netfs_attempt_rmdir (struct iouser *user,
-			     struct node *dir, char *name)
+			     struct node *dir, const char *name)
 {
 	return EROFS;
 }
@@ -366,7 +366,7 @@ error_t netfs_attempt_chmod (struct ious
 
 /* Attempt to turn NODE (user CRED) into a symlink with target NAME. */
 error_t netfs_attempt_mksymlink (struct iouser *cred, struct node *node,
-				 char *name)
+				 const char *name)
 {
 	return EROFS;
 }
@@ -382,7 +382,7 @@ error_t netfs_attempt_mkdev (struct ious
 /* Attempt to set the passive translator record for FILE to ARGZ (of length
    ARGZLEN) for user CRED. */
 error_t netfs_set_translator (struct iouser *cred, struct node *node,
-			char *argz, size_t argzlen)
+			const char *argz, size_t argzlen)
 {
 	return EROFS;
 }
@@ -434,7 +434,7 @@ error_t netfs_attempt_syncfs (struct iou
    DIR nor FILE are locked.  If EXCL is set, do not delete the target, but
    return EEXIST if NAME is already found in DIR.  */
 error_t netfs_attempt_link (struct iouser *user, struct node *dir,
-			struct node *file, char *name, int excl)
+			struct node *file, const char *name, int excl)
 {
 	return EROFS;
 }
@@ -502,7 +502,7 @@ error_t netfs_attempt_read (struct iouse
    to *LEN bytes from DATA.  Set *LEN to the amount seccessfully written upon
    return. */
 error_t netfs_attempt_write (struct iouser *cred, struct node *node,
-			 loff_t offset, size_t *len, void *data)
+			 loff_t offset, size_t *len, const void *data)
 {
 	return EROFS;
 }
Index: util-hurd-0.0.20170102/nsmux/nsmux.c
===================================================================
--- util-hurd-0.0.20170102.orig/nsmux/nsmux.c
+++ util-hurd-0.0.20170102/nsmux/nsmux.c
@@ -77,7 +77,7 @@ FILE *nsmux_dbg;
 error_t
   netfs_attempt_create_file
   (struct iouser *user,
-   struct node *dir, char *name, mode_t mode, struct node **node)
+   struct node *dir, const char *name, mode_t mode, struct node **node)
 {
   LOG_MSG ("netfs_attempt_create_file");
 
@@ -458,7 +458,7 @@ error_t
 /*Looks up `name` under `dir` for `user`*/
 error_t
   netfs_attempt_lookup
-  (struct iouser * user, struct node * dir, char *name, struct node ** node)
+  (struct iouser * user, struct node * dir, const char *name, struct node ** node)
 {
   LOG_MSG ("netfs_attempt_lookup");
 
@@ -476,7 +476,7 @@ error_t
   create a proxy node and return it in `node`.*/
 error_t
   netfs_attempt_lookup_improved
-  (struct iouser * user, struct node * dir, char *name, int flags,
+  (struct iouser * user, struct node * dir, const char *name, int flags,
    int lastcomp, node_t ** node, file_t * file, int proxy)
 {
   LOG_MSG ("netfs_attempt_lookup_improved: '%s'", name);
@@ -590,7 +590,7 @@ error_t
   }				/*finalize */
 
   /*Performs a usual lookup */
-  error_t lookup (char *name,	/*lookup this */
+  error_t lookup (const char *name,	/*lookup this */
 		  int flags,	/*lookup `name` in the this way */
 		  int proxy	/*should a proxy node be created */
     )
@@ -747,7 +747,7 @@ error_t
 error_t
   netfs_S_dir_lookup
   (struct protid * diruser,
-   char *filename,
+   const char *filename,
    int flags,
    mode_t mode,
    retry_type * do_retry,
@@ -1343,7 +1343,7 @@ out:
 /*---------------------------------------------------------------------------*/
 /*Deletes `name` in `dir` for `user`*/
 error_t
-  netfs_attempt_unlink (struct iouser * user, struct node * dir, char *name)
+  netfs_attempt_unlink (struct iouser * user, struct node * dir, const char *name)
 {
   LOG_MSG ("netfs_attempt_unlink");
 
@@ -1356,7 +1356,7 @@ error_t
   netfs_attempt_rename
   (struct iouser * user,
    struct node * fromdir,
-   char *fromname, struct node * todir, char *toname, int excl)
+   const char *fromname, struct node * todir, const char *toname, int excl)
 {
   LOG_MSG ("netfs_attempt_rename");
 
@@ -1368,7 +1368,7 @@ error_t
 /*Attempts to create a new directory*/
 error_t
   netfs_attempt_mkdir
-  (struct iouser * user, struct node * dir, char *name, mode_t mode)
+  (struct iouser * user, struct node * dir, const char *name, mode_t mode)
 {
   LOG_MSG ("netfs_attempt_mkdir");
 
@@ -1378,7 +1378,7 @@ error_t
 /*---------------------------------------------------------------------------*/
 /*Attempts to remove directory `name` in `dir` for `user`*/
 error_t
-  netfs_attempt_rmdir (struct iouser * user, struct node * dir, char *name)
+  netfs_attempt_rmdir (struct iouser * user, struct node * dir, const char *name)
 {
   LOG_MSG ("netfs_attempt_rmdir");
 
@@ -1424,7 +1424,7 @@ error_t
 /*Attempts to turn `node` into a symlink targetting `name`*/
 error_t
   netfs_attempt_mksymlink
-  (struct iouser * cred, struct node * node, char *name)
+  (struct iouser * cred, struct node * node, const char *name)
 {
   LOG_MSG ("netfs_attempt_mksymlink");
 
@@ -1449,7 +1449,7 @@ error_t
 /*Attempts to set the passive translator record for `file` passing `argz`*/
 error_t
   netfs_set_translator
-  (struct iouser * cred, struct node * node, char *argz, size_t arglen)
+  (struct iouser * cred, struct node * node, const char *argz, size_t arglen)
 {
   LOG_MSG ("netfs_set_translator");
 
@@ -1507,7 +1507,7 @@ error_t netfs_attempt_syncfs (struct iou
 error_t
   netfs_attempt_link
   (struct iouser * user,
-   struct node * dir, struct node * file, char *name, int excl)
+   struct node * dir, struct node * file, const char *name, int excl)
 {
   LOG_MSG ("netfs_attempt_link");
 
@@ -1578,7 +1578,7 @@ error_t
 error_t
   netfs_attempt_write
   (struct iouser * cred,
-   struct node * node, loff_t offset, size_t * len, void *data)
+   struct node * node, loff_t offset, size_t * len, const void *data)
 {
   /*Write the supplied data into the file and return the result */
   return io_write (node->nn->port, data, *len, offset, len);
Index: util-hurd-0.0.20170102/nsmux/nsmux.h
===================================================================
--- util-hurd-0.0.20170102.orig/nsmux/nsmux.h
+++ util-hurd-0.0.20170102/nsmux/nsmux.h
@@ -74,7 +74,7 @@ extern fshelp_fetch_root_callback2_t _ne
 error_t
   netfs_attempt_create_file
   (struct iouser *user,
-   struct node *dir, char *name, mode_t mode, struct node **node);
+   struct node *dir, const char *name, mode_t mode, struct node **node);
 /*---------------------------------------------------------------------------*/
 /*Returns an error if the process of opening a file should not be allowed
 	to complete because of insufficient permissions*/
@@ -112,7 +112,7 @@ error_t
 /*Looks up `name` under `dir` for `user`*/
 error_t
   netfs_attempt_lookup
-  (struct iouser *user, struct node *dir, char *name, struct node **node);
+  (struct iouser *user, struct node *dir, const char *name, struct node **node);
 /*---------------------------------------------------------------------------*/
 /*Performs an advanced lookup of file `name` under `dir`. If the
   lookup of the last component of the path is requested (`lastcomp` is
@@ -122,14 +122,14 @@ error_t
   proxy node and return it in `node`.*/
 error_t
   netfs_attempt_lookup_improved
-  (struct iouser * user, struct node * dir, char *name, int flags,
+  (struct iouser * user, struct node * dir, const char *name, int flags,
    int lastcomp, node_t ** node, file_t * file, int proxy);
 /*---------------------------------------------------------------------------*/
 /*Responds to the RPC dir_lookup*/
 error_t
   netfs_S_dir_lookup
   (struct protid *diruser,
-   char *filename,
+   const char *filename,
    int flags,
    mode_t mode,
    retry_type * do_retry,
@@ -138,23 +138,23 @@ error_t
 /*---------------------------------------------------------------------------*/
 /*Deletes `name` in `dir` for `user`*/
 error_t
-  netfs_attempt_unlink (struct iouser *user, struct node *dir, char *name);
+  netfs_attempt_unlink (struct iouser *user, struct node *dir, const char *name);
 /*---------------------------------------------------------------------------*/
 /*Attempts to rename `fromdir`/`fromname` to `todir`/`toname`*/
 error_t
   netfs_attempt_rename
   (struct iouser *user,
    struct node *fromdir,
-   char *fromname, struct node *todir, char *toname, int excl);
+   const char *fromname, struct node *todir, const char *toname, int excl);
 /*---------------------------------------------------------------------------*/
 /*Attempts to create a new directory*/
 error_t
   netfs_attempt_mkdir
-  (struct iouser *user, struct node *dir, char *name, mode_t mode);
+  (struct iouser *user, struct node *dir, const char *name, mode_t mode);
 /*---------------------------------------------------------------------------*/
 /*Attempts to remove directory `name` in `dir` for `user`*/
 error_t
-  netfs_attempt_rmdir (struct iouser *user, struct node *dir, char *name);
+  netfs_attempt_rmdir (struct iouser *user, struct node *dir, const char *name);
 /*---------------------------------------------------------------------------*/
 /*Attempts to change the owner of `node` for user `cred` to `uid`:`gid`*/
 error_t
@@ -173,7 +173,7 @@ error_t
 /*Attempts to turn `node` into a symlink targetting `name`*/
 error_t
   netfs_attempt_mksymlink
-  (struct iouser *cred, struct node *node, char *name);
+  (struct iouser *cred, struct node *node, const char *name);
 /*---------------------------------------------------------------------------*/
 /*Attempts to turn `node` into a device; type can be either S_IFBLK or S_IFCHR*/
 error_t
@@ -183,7 +183,7 @@ error_t
 /*Attempts to set the passive translator record for `file` passing `argz`*/
 error_t
   netfs_set_translator
-  (struct iouser *cred, struct node *node, char *argz, size_t arglen);
+  (struct iouser *cred, struct node *node, const char *argz, size_t arglen);
 /*---------------------------------------------------------------------------*/
 /*Attempts to call chflags for `node`*/
 error_t
@@ -206,7 +206,7 @@ error_t netfs_attempt_syncfs (struct iou
 error_t
   netfs_attempt_link
   (struct iouser *user,
-   struct node *dir, struct node *file, char *name, int excl);
+   struct node *dir, struct node *file, const char *name, int excl);
 /*---------------------------------------------------------------------------*/
 /*Attempts to create an anonymous file related to `dir` with `mode`*/
 error_t
@@ -227,7 +227,7 @@ error_t
 error_t
   netfs_attempt_write
   (struct iouser *cred,
-   struct node *node, loff_t offset, size_t * len, void *data);
+   struct node *node, loff_t offset, size_t * len, const void *data);
 /*---------------------------------------------------------------------------*/
 /*Frees all storage associated with the node*/
 void netfs_node_norefs (struct node *np);
Index: util-hurd-0.0.20170102/pptop/configure.ac
===================================================================
--- util-hurd-0.0.20170102.orig/pptop/configure.ac
+++ util-hurd-0.0.20170102/pptop/configure.ac
@@ -5,7 +5,7 @@ AC_CONFIG_SRCDIR([aux.c])
 AM_CONFIG_HEADER(config.h)
 
 ALL_LINGUAS="en de"
-AM_GNU_GETTEXT
+AM_GNU_GETTEXT([external])
 
 # Checks for programs.
 AC_PROG_CC
Index: util-hurd-0.0.20170102/pith/Hurd/Trivfs/Trivfs.xs
===================================================================
--- util-hurd-0.0.20170102.orig/pith/Hurd/Trivfs/Trivfs.xs
+++ util-hurd-0.0.20170102/pith/Hurd/Trivfs/Trivfs.xs
@@ -386,7 +386,7 @@ protid_destroy (struct trivfs_protid *pr
 kern_return_t
 trivfs_S_io_write (struct trivfs_protid *cred,
 		   mach_port_t reply, mach_msg_type_name_t replytype,
-		   data_t data, mach_msg_type_number_t data_len,
+		   const_data_t data, mach_msg_type_number_t data_len,
 		   off_t offs, mach_msg_type_number_t *amount)
 {
   error_t ret;
Index: util-hurd-0.0.20170102/pptop/Makefile.am
===================================================================
--- util-hurd-0.0.20170102.orig/pptop/Makefile.am
+++ util-hurd-0.0.20170102/pptop/Makefile.am
@@ -1,6 +1,6 @@
 ## Process this file with automake
 
-SUBDIRS = intl po
+SUBDIRS = po
 
 bin_PROGRAMS = pptop
 pptop_SOURCES = pptop.c aux.c help.c filter.c title.c options.c fields.c \
Index: util-hurd-0.0.20170102/run/run.c
===================================================================
--- util-hurd-0.0.20170102.orig/run/run.c
+++ util-hurd-0.0.20170102/run/run.c
@@ -203,7 +203,7 @@ close_hook (struct trivfs_peropen *perop
 /* Read data from an IO object.  If offset is -1, read from the object
    maintained file pointer.  If the object is not seekable, offset is
    ignored.  The amount desired to be read is in AMOUNT.  */
-error_t
+kern_return_t
 trivfs_S_io_read (struct trivfs_protid *cred,
                   mach_port_t reply, mach_msg_type_name_t reply_type,
                   data_t *data, mach_msg_type_number_t *data_len,
@@ -249,7 +249,7 @@ trivfs_S_io_read (struct trivfs_protid *
 
 
 /* Change current read/write offset */
-error_t
+kern_return_t
 trivfs_S_io_seek (struct trivfs_protid *cred,
                   mach_port_t reply, mach_msg_type_name_t reply_type,
                   off_t offs, int whence, off_t *new_offs)
Index: util-hurd-0.0.20170102/tarfs/backend.h
===================================================================
--- util-hurd-0.0.20170102.orig/tarfs/backend.h
+++ util-hurd-0.0.20170102/tarfs/backend.h
@@ -61,7 +61,7 @@ struct fs_backend
   error_t (*get_args)(char **argz, unsigned *argz_len);
 
   /* Set options (see netfs_set_options()). */
-  error_t (*set_options)(char *argz, size_t argz_len);
+  error_t (*set_options)(const char *argz, size_t argz_len);
 
 
   /* 
@@ -87,21 +87,21 @@ struct fs_backend
 
   /* Changing a node */
   error_t (* write_node) (struct node *np, off_t offset,
-  			  size_t *len, void* data);
+  			  size_t *len, const void* data);
 
   /* Change NP's stats.  */
   error_t (* change_stat)(struct node *np, const io_statbuf_t *new_stat);
 
   /* Creates a node named NAME in DIR which is locked.  */
   error_t (* create_node) (struct node **new, struct node *dir,
-  			   char *name, mode_t m);
+  			   const char *name, mode_t m);
 
   /* Unlinks NODE.  NODE can be a directory in which case it is empty.  */
   error_t (* unlink_node) (struct node *node);
 
   /* Tries to create a hard link named NAME in DIR to file NODE.  */
   error_t (* link_node) (struct node *dir, struct node *target,
-  			 char *name, int excl); /* Same as netfs semantics */
+  			 const char *name, int excl); /* Same as netfs semantics */
 
   /* Makes NODE a symlink to TARGET.  */
   error_t (* symlink_node) (struct node *node, const char *target);
Index: util-hurd-0.0.20170102/tarfs/fs.c
===================================================================
--- util-hurd-0.0.20170102.orig/tarfs/fs.c
+++ util-hurd-0.0.20170102/tarfs/fs.c
@@ -135,7 +135,7 @@ filter_node_name (char* name)
 
 /* Returns either NULL or a pointer to a node if found.  */
 static inline struct node*
-_find_node (struct node *dir, char *name)
+_find_node (struct node *dir, const char *name)
 {
   struct node *node = NULL;
 
@@ -176,7 +176,7 @@ _find_node (struct node *dir, char *name
 }
 
 struct node *
-fs_find_node (struct node *dir, char *name)
+fs_find_node (struct node *dir, const char *name)
 {
   return _find_node (dir, name);
 }
@@ -461,9 +461,10 @@ fs_get_path_from_root (struct node *root
     if (strlen (path) + strlen (n->nn->name) + 1 + 1 > len)
     {
       char* new;
+      size_t offset = ptr - path;
       len *= 2;
       new = realloc (path, len);
-      ptr = new + (ptr - path);
+      ptr = new + offset;
       path = new;
     }
     REVERSE_COPY (ptr, n->nn->name);
@@ -507,9 +508,10 @@ fs_get_path_to_root (struct node *root,
     if (strlen (path) + 3 + 1 > len)
     {
       char* new;
+      size_t offset = ptr - path;
       len *= 2;
       new = realloc (path, len);
-      ptr = new + (ptr - path);
+      ptr = new + offset;
       path = new;
     }
     strncpy (ptr, "../", 3);
Index: util-hurd-0.0.20170102/tarfs/fs.h
===================================================================
--- util-hurd-0.0.20170102.orig/tarfs/fs.h
+++ util-hurd-0.0.20170102/tarfs/fs.h
@@ -48,7 +48,7 @@ extern error_t fs_dir_last_entry (struct
 
 /* Returns either NULL or a pointer to a node if found.  */
 extern struct node*
-fs_find_node (struct node *dir, char *name);
+fs_find_node (struct node *dir, const char *name);
 
 /* Looks for a node located at PATH, starting at directory N.
    When looking for "/foo/bar":
Index: util-hurd-0.0.20170102/httpfs/node.c
===================================================================
--- util-hurd-0.0.20170102.orig/httpfs/node.c
+++ util-hurd-0.0.20170102/httpfs/node.c
@@ -58,14 +58,16 @@ struct netnode *httpfs_make_netnode (cha
 
 /* free an instance of `struct netnode' */
 void free_netnode (struct netnode *node) {
-	struct node *nd;
+	struct node *nd, *next;
 
 	free (node->url);   
 	free (node->conn_req);
 	free (node->comm_buf);
 	free (node->file_name);
-	for (nd = node->ents; nd; nd = nd->next)
+	for (nd = node->ents; nd; nd = next) {
+		next = nd->next;
 		free (nd);
+	}
 }
 
 /* make an instance of `struct node' with the specified parameters,
Index: util-hurd-0.0.20170102/tarfs/cache.c
===================================================================
--- util-hurd-0.0.20170102.orig/tarfs/cache.c
+++ util-hurd-0.0.20170102/tarfs/cache.c
@@ -367,7 +367,7 @@ cache_set_size (struct node *node, size_
 /* Writes at most LEN bytes from NODE at OFFSET into BUF.
    Returns the amount of data actually written in AMOUNT.  */
 error_t
-cache_write (struct node *node, off_t offset, void *data,
+cache_write (struct node *node, off_t offset, const void *data,
 	     size_t len, size_t *amount)
 {
   error_t err  = 0;
Index: util-hurd-0.0.20170102/tarfs/cache.h
===================================================================
--- util-hurd-0.0.20170102.orig/tarfs/cache.h
+++ util-hurd-0.0.20170102/tarfs/cache.h
@@ -69,7 +69,7 @@ extern error_t cache_read (struct node *
 /* Writes at most LEN bytes from NODE at OFFSET into BUF.
    Returns the amount of data actually written in AMOUNT.  */
 extern error_t cache_write (struct node *node, off_t offset,
-			    void *data, size_t len, size_t *amount);
+			    const void *data, size_t len, size_t *amount);
 
 /* Sets the size of NODE and reduce/grow its cache.  */
 extern error_t cache_set_size (struct node *node, size_t size);
Index: util-hurd-0.0.20170102/xmlfs/fsutils.c
===================================================================
--- util-hurd-0.0.20170102.orig/xmlfs/fsutils.c
+++ util-hurd-0.0.20170102/xmlfs/fsutils.c
@@ -291,9 +291,10 @@ get_path_from_root (struct node *root, s
     if (strlen (path) + strlen (n->nn->name) + 1 + 1 > len)
     {
       char* new;
+      size_t offset = ptr - path;
       len *= 2;
       new = realloc (path, len);
-      ptr = new + (ptr - path);
+      ptr = new + offset;
       path = new;
     }
     REVERSE_COPY (ptr, n->nn->name);
@@ -339,9 +340,10 @@ get_path_to_root (struct node *root, str
     if (strlen (path) + 3 + 1 > len)
     {
       char* new;
+      size_t offset = ptr - path;
       len *= 2;
       new = realloc (path, len);
-      ptr = new + (ptr - path);
+      ptr = new + offset;
       path = new;
     }
     strncpy (ptr, "../", 3);
Index: util-hurd-0.0.20170102/nsmux/lnode.c
===================================================================
--- util-hurd-0.0.20170102.orig/nsmux/lnode.c
+++ util-hurd-0.0.20170102/nsmux/lnode.c
@@ -69,7 +69,7 @@ void lnode_ref_remove (lnode_t * node)
 /*---------------------------------------------------------------------------*/
 /*Creates a new lnode with `name`; the new node is locked and contains
   a single reference*/
-error_t lnode_create (char *name, lnode_t ** node)
+error_t lnode_create (const char *name, lnode_t ** node)
 {
   /*Allocate the memory for the node */
   lnode_t *node_new = malloc (sizeof (lnode_t));
@@ -225,7 +225,7 @@ error_t lnode_path_construct (lnode_t *
 /*---------------------------------------------------------------------------*/
 /*Gets a light node by its name, locks it and increments its refcount*/
 error_t lnode_get (lnode_t * dir,	/*search here */
-		   char *name,	/*search for this name */
+		   const char *name,	/*search for this name */
 		   lnode_t ** node	/*put the result here */
 		   )
 {
Index: util-hurd-0.0.20170102/nsmux/lnode.h
===================================================================
--- util-hurd-0.0.20170102.orig/nsmux/lnode.h
+++ util-hurd-0.0.20170102/nsmux/lnode.h
@@ -107,7 +107,7 @@ void lnode_ref_remove (lnode_t * node);
 /*---------------------------------------------------------------------------*/
 /*Creates a new lnode with `name`; the new node is locked and contains
   a single reference*/
-error_t lnode_create (char *name, lnode_t ** node);
+error_t lnode_create (const char *name, lnode_t ** node);
 /*---------------------------------------------------------------------------*/
 /*Destroys the given lnode*/
 void lnode_destroy (lnode_t * node);
@@ -119,7 +119,7 @@ error_t lnode_path_construct (lnode_t *
 /*---------------------------------------------------------------------------*/
 /*Gets a light node by its name, locks it and increments its refcount*/
 error_t lnode_get (lnode_t * dir,	/*search here */
-		   char *name,	        /*search for this name */
+		   const char *name,	        /*search for this name */
 		   lnode_t ** node	/*put the result here */
 		   );
 /*---------------------------------------------------------------------------*/
Index: util-hurd-0.0.20170102/nsmux/node.c
===================================================================
--- util-hurd-0.0.20170102.orig/nsmux/node.c
+++ util-hurd-0.0.20170102/nsmux/node.c
@@ -729,8 +729,8 @@ error_t node_unlink_file (node_t * dir,
   of the translator opened as `flags.`*/
 error_t 
   node_set_translator
-  (struct protid * diruser, node_t * np, char * trans, int flags,
-   char * filename, mach_port_t * port)
+  (struct protid * diruser, node_t * np, const char * trans, int flags,
+   const char * filename, mach_port_t * port)
 {
   error_t err;
   mach_port_t p;
Index: util-hurd-0.0.20170102/nsmux/node.h
===================================================================
--- util-hurd-0.0.20170102.orig/nsmux/node.h
+++ util-hurd-0.0.20170102/nsmux/node.h
@@ -151,8 +151,8 @@ error_t node_unlink_file (node_t * dir,
   of the translator opened as `flags.`*/
 error_t
   node_set_translator
-  (struct protid *diruser, node_t * np, char * trans, int flags,
-   char * filename, mach_port_t * port);
+  (struct protid *diruser, node_t * np, const char * trans, int flags,
+   const char * filename, mach_port_t * port);
 /*---------------------------------------------------------------------------*/
 /*Gets the port to the supplied node. */
 error_t
Index: util-hurd-0.0.20170102/pptop/filter.c
===================================================================
--- util-hurd-0.0.20170102.orig/pptop/filter.c
+++ util-hurd-0.0.20170102/pptop/filter.c
@@ -35,6 +35,7 @@
 #define FILTER_COUNT 6
 
 
+#include <unistd.h>
 #include <ps.h>
 #include <pwd.h>
 #include <ncurses.h>
Index: util-hurd-0.0.20170102/pptop/options.c
===================================================================
--- util-hurd-0.0.20170102.orig/pptop/options.c
+++ util-hurd-0.0.20170102/pptop/options.c
@@ -23,6 +23,8 @@
 #endif
 
 #include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 #include <ncurses.h>
 #include <fcntl.h>
 #include <libintl.h>
Index: util-hurd-0.0.20170102/pptop/title.c
===================================================================
--- util-hurd-0.0.20170102.orig/pptop/title.c
+++ util-hurd-0.0.20170102/pptop/title.c
@@ -18,6 +18,8 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA */
 
+#include <string.h>
+
 char *title;
 int offset, t_len;
 
