Subject: Re: statfs->statvfs troubles.
To: <>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 04/23/2004 22:57:46
> Hmm, src/UPDATING was updated finally:
>
> 20040418:
> Statfs(2) and friends have been replaced with statvfs(2). Before
> installing a newly build userland make sure that you are running
> a newly built kernel with COMPAT_20 set. In addition your libc
> build might not work (undefined SYS_statfs symbol) because make
> clean does not know how to remove files it does not know about
> anymore. Manually remove all objects from the libc build directory.
The following patch to src/lib/libc/sys/Makefile.inc probably fixes
things. Can someone with a broken obj tree try it and then do an
update build?
David
Index: Makefile.inc
===================================================================
RCS file: /cvsroot/src/lib/libc/sys/Makefile.inc,v
retrieving revision 1.152
diff -u -p -r1.152 Makefile.inc
--- Makefile.inc 21 Apr 2004 01:05:32 -0000 1.152
+++ Makefile.inc 23 Apr 2004 21:46:38 -0000
@@ -94,6 +94,28 @@ NOERR= getegid.S geteuid.S getgid.S getp
PSEUDONOERR= _exit.S
+# Files which used to have default implementation, but don't any more
+OLDASM= statfs.S getfsstat.S fstatfs.S fhstatfs.S
+
+# Delete the obsolete generated sources as we parse the Makefile
+DEL_OLD:=
+.for OLD in ${OLDASM}
+.if exists(${OLD})
+DEL_OLD!= rm -f ${OLD:.S=}.*; echo yes
+.endif
+.endfor
+# If we deleted any, remove the relevant entries from .depend
+.if ${DEL_OLD} == "yes" && exists(.depend)
+DEL_OLD!= oldasm=' ${OLDASM} '; \
+ while IFS=; read line; do \
+ IFS=':'; set -- $$line; \
+ IFS=' '; set -- $$2; \
+ [ "$${oldasm% $$1 *}" = "$${oldasm}" ] && \
+ echo "$$line"; \
+ done <.depend >.depend.new && mv -f .depend.new .depend; \
+ echo x
+.endif
+
SRCS+= ${ASM} ${WEAKASM} ${NOERR} ${PSEUDONOERR}
CLEANFILES+= ${ASM} ${WEAKASM} ${NOERR} ${PSEUDONOERR}
--
David Laight: david@l8s.co.uk