Module Name: src Committed By: pho Date: Sat Jan 22 13:25:55 UTC 2022
Modified Files: src/lib/librefuse/refuse: buf.c Log Message: Use sysconf(_SC_PAGESIZE) instead of PAGE_SIZE It broke build on platforms where PAGE_SIZE was not defined in <machine/vmparam.h>. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/librefuse/refuse/buf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/librefuse/refuse/buf.c diff -u src/lib/librefuse/refuse/buf.c:1.1 src/lib/librefuse/refuse/buf.c:1.2 --- src/lib/librefuse/refuse/buf.c:1.1 Sat Jan 22 07:54:57 2022 +++ src/lib/librefuse/refuse/buf.c Sat Jan 22 13:25:55 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: buf.c,v 1.1 2022/01/22 07:54:57 pho Exp $ */ +/* $NetBSD: buf.c,v 1.2 2022/01/22 13:25:55 pho Exp $ */ /* * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -31,13 +31,12 @@ #include <sys/cdefs.h> #if !defined(lint) -__RCSID("$NetBSD: buf.c,v 1.1 2022/01/22 07:54:57 pho Exp $"); +__RCSID("$NetBSD: buf.c,v 1.2 2022/01/22 13:25:55 pho Exp $"); #endif /* !lint */ #include <assert.h> #include <errno.h> #include <fuse_internal.h> -#include <machine/vmparam.h> /* for PAGE_SIZE */ #include <stdbool.h> #include <stdint.h> #include <stdlib.h> @@ -165,7 +164,7 @@ fuse_buf_copy_fd_to_fd(const struct fuse ssize_t total = 0; struct fuse_buf tmp; - tmp.size = PAGE_SIZE; + tmp.size = (size_t)sysconf(_SC_PAGESIZE); tmp.flags = (enum fuse_buf_flags)0; tmp.mem = malloc(tmp.size);