--- Makefile.in.orig	Thu Jul 27 01:08:33 2000
+++ Makefile.in	Tue Apr 10 17:58:37 2001
@@ -31,7 +31,7 @@
 MD5SUM=@MD5SUM_SIMPLE@
 CWD=$(shell pwd)
 
-INSTALL_GROUP=root
+INSTALL_GROUP=wheel
 INSTALL_FLAGS=-o root -g $(INSTALL_GROUP)
 
 INSTALL=@INSTALL@
@@ -43,9 +43,12 @@
 mandir=$(prefix)/man
 man1dir=$(mandir)/man1
 sbindir=$(exec_prefix)/sbin
-etcdir=/etc
+etcdir=$(prefix)/etc
 etcsubdir=$(etcdir)/userv
 docdir=$(prefix)/userv
+varsubdir=$(prefix)/run/userv
+
+CFLAGS += -DVARDIR='"$(varsubdir)"' -DSYSTEMCONFIGDIR='"$(etcdir)"'
 
 TARGETS=	daemon client
 TARGETS_DOC_PS=	spec.ps overview.ps
@@ -72,6 +75,7 @@
 install:	all
 		$(INSTALL_PROGRAM) -m 755 daemon $(sbindir)/uservd
 		$(INSTALL_PROGRAM) -m 4755 client $(bindir)/userv
+		$(INSTALL) -d -m 2755 $(varsubdir)
 		$(INSTALL) -d -m 2755 $(etcsubdir) \
 	$(etcsubdir)/default.d $(etcsubdir)/services.d $(etcsubdir)/override.d
 		if test ! -f $(etcsubdir)/system.default; then \
--- client.c.orig	Sun Oct 10 12:48:43 1999
+++ client.c	Tue Apr 10 16:45:24 2001
@@ -479,10 +479,10 @@
   { "append",    fdm_write|fdm_append,
                  fdm_read|fdm_fd,
                  O_WRONLY|O_CREAT|O_APPEND                                        },
   { "sync",      fdm_write|fdm_sync,
                  fdm_read|fdm_fd,
-                 O_WRONLY|O_CREAT|O_SYNC                                          },
+                 O_WRONLY|O_CREAT|O_FSYNC                                          },
   { "wait",      fdm_wait,
                  fdm_nowait|fdm_close,
                  0                                                                },
   { "nowait",    fdm_nowait,
