Fixed compiling on NetBSD 3.1

This commit is contained in:
Michiel Broek
2007-08-26 14:02:27 +00:00
parent c78578675c
commit 52ec72ec15
7 changed files with 63 additions and 5 deletions

View File

@@ -614,13 +614,21 @@ int putsec(char *buf, int n)
int getfree(void)
{
#ifdef __NetBSD__
struct statvfs sfs;
#else
struct statfs sfs;
#endif
char *temp;
temp = calloc(PATH_MAX, sizeof(char));
snprintf(temp, PATH_MAX, "%s/%s/upl", CFG.bbs_usersdir, exitinfo.Name);
#ifdef __NetBSD__
if (statvfs(temp, &sfs) != 0) {
#else
if (statfs(temp, &sfs) != 0) {
#endif
WriteError("$cannot statfs \"%s\", assume enough space", temp);
free(temp);
return -1L;