Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jun 2002 13:52:25 -0400 (EDT)
From:      Garrett Wollman <wollman@lcs.mit.edu>
To:        Jun Kuriyama <kuriyama@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: ports/net/net-snmp/files patch-al
Message-ID:  <200206241752.g5OHqP6M004480@khavrinen.lcs.mit.edu>
In-Reply-To: <200206240046.g5O0kiG62693@freefall.freebsd.org>
References:  <200206240046.g5O0kiG62693@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Sun, 23 Jun 2002 17:46:44 -0700 (PDT), Jun Kuriyama <kuriyama@FreeBSD.org> said:

>   This breakage is caused because:
>     o struct statvfs is defined and statvfs() function is declared.
>     o statvfs() function is not yet implemented.
  
>   So detection of statvfs related is commented out until function will
>   be implemented.
  
Actually, the correct fix is:

if test "${ac_cv_header_sys_statvfs_h}" = "yes"; then
   AC_CHECK_FUNC(statvfs)
fi

...and then in the C code...

#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
#endif

/* ... */

#if defined(HAVE_STRUCT_STATVFS)
	struct statvfs buf;
#elif defined(HAVE_STRUCT_STATFS)
	struct statfs buf;
#else
	/* do whatever else you might do */
#endif

#if defined(HAVE_STATVFS)
	rv = statvfs(path, &buf);
#elif defined(OTHER_METHOD)
	/* ... */
#elif defined(YET_ANOTHER_METHOD)
	/* ... */
#endif

-GAWollman


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206241752.g5OHqP6M004480>