Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/sys libc: Add a dummy implementation of vadvise()
details: https://anonhg.NetBSD.org/src/rev/5bbf770f2a84
branches: trunk
changeset: 358365:5bbf770f2a84
user: kamil <kamil%NetBSD.org@localhost>
date: Mon Dec 25 11:03:30 2017 +0000
description:
libc: Add a dummy implementation of vadvise()
This readds a symbol that has been removed accidentally without major bump.
The implementation is dummy (similar to the old one), without API in public
headers.
Pointed out by <maya>
Sponsored by <The NetBSD Foundation>
diffstat:
lib/libc/sys/Makefile.inc | 8 ++++----
lib/libc/sys/vadvise.c | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 4 deletions(-)
diffs (67 lines):
diff -r b1f8aa52cb3f -r 5bbf770f2a84 lib/libc/sys/Makefile.inc
--- a/lib/libc/sys/Makefile.inc Mon Dec 25 09:13:40 2017 +0000
+++ b/lib/libc/sys/Makefile.inc Mon Dec 25 11:03:30 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.237 2017/12/19 18:43:42 kamil Exp $
+# $NetBSD: Makefile.inc,v 1.238 2017/12/25 11:03:30 kamil Exp $
# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
# sys sources
@@ -7,9 +7,9 @@
# other sources shared with the kernel, used in syscalls
SRCS+= cpuset.c
# glue to offer userland wrappers for some syscalls
-SRCS+= posix_fadvise.c posix_madvise.c sched.c sigqueue.c sigtimedwait.c \
- sigwait.c sigwaitinfo.c statvfs.c swapon.c semctl.c \
- clock_getcpuclockid.c accept4.c
+SRCS+= accept4.c clock_getcpuclockid.c posix_fadvise.c posix_madvise.c \
+ sched.c sigqueue.c sigtimedwait.c sigwait.c sigwaitinfo.c statvfs.c \
+ swapon.c semctl.c vadvise.c
.if ${RUMPRUN} != "yes"
# modules with non-default implementations on at least one architecture:
diff -r b1f8aa52cb3f -r 5bbf770f2a84 lib/libc/sys/vadvise.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/sys/vadvise.c Mon Dec 25 11:03:30 2017 +0000
@@ -0,0 +1,41 @@
+/* $NetBSD: vadvise.c,v 1.1 2017/12/25 11:03:30 kamil Exp $ */
+
+/*-
+ * Copyright (c) 2017 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: vadvise.c,v 1.1 2017/12/25 11:03:30 kamil Exp $");
+
+int vadvise(int va);
+
+int
+vadvise(int va)
+{
+
+ (void)va;
+
+ return 0;
+}
Home |
Main Index |
Thread Index |
Old Index