Subject: lib/29919: getmntinfo() calling deprecated function getfsstat()
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <evaldo@gardenali.biz>
List: netbsd-bugs
Date: 04/07/2005 15:28:01
>Number:         29919
>Category:       lib
>Synopsis:       getmntinfo() calling deprecated function getfsstat()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 07 15:28:00 +0000 2005
>Originator:     Evaldo Gardenali
>Release:        Host: Linux 2.6.11.4, target: 20050406 "netbsd-3" branch, i386 build
>Organization:
>Environment:
Linux perere 2.6.11.4 #6 Sun Apr 3 14:38:48 BRT 2005 i686 unknown unknown GNU/Linux

>Description:
I am cross-building NetBSD (20050406 -rnetbsd-3) on Linux (Slackware 10.1) and the build fails due to the following problem:
 /home/evaldo/src/obj/destdir.i386/usr/lib/libc.a(getmntinfo.o)(.text+0x70): In function `_getmntinfo':
 : warning: warning: reference to obsolete getfsstat(); use getvfsstat()
 collect2: ld returned 1 exit status

the file in question is src/lib/libc/gen/getmntinfo.c

I tried CFLAGS=-w, as suggested in #netbsd, but it still would not build, and Tonnerre suggested me to patch the source, changing just the function name in the calls, which I obviously thought would not work, but I gave it a try, and it indeed failed, because the prototypes are different.
>How-To-Repeat:
fetch the "src" module under "netbsd-3" tag from CVS as of 20050406;
./build.sh -U -N 1 -m i386 tools
./build.sh -U -N 1 -m i386 release
wait for the compile abort and inspect the errors

>Fix: