Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librefuse/refuse Use sysconf(_SC_PAGESIZE) instead of PA...
details: https://anonhg.NetBSD.org/src/rev/0b1124d11da0
branches: trunk
changeset: 359779:0b1124d11da0
user: pho <pho%NetBSD.org@localhost>
date: Sat Jan 22 13:25:55 2022 +0000
description:
Use sysconf(_SC_PAGESIZE) instead of PAGE_SIZE
It broke build on platforms where PAGE_SIZE was not defined in
<machine/vmparam.h>.
diffstat:
lib/librefuse/refuse/buf.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r 9e8a72380193 -r 0b1124d11da0 lib/librefuse/refuse/buf.c
--- a/lib/librefuse/refuse/buf.c Sat Jan 22 11:58:15 2022 +0000
+++ b/lib/librefuse/refuse/buf.c Sat Jan 22 13:25:55 2022 +0000
@@ -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 @@
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);
Home |
Main Index |
Thread Index |
Old Index