Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libkern Allow this to be built for the strlist.c uni...



details:   https://anonhg.NetBSD.org/src/rev/96f55e4154c3
branches:  trunk
changeset: 980047:96f55e4154c3
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Jan 21 15:44:14 2021 +0000

description:
Allow this to be built for the strlist.c unit tests.

diffstat:

 sys/lib/libkern/pmatch.c |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r e9b3b829d87e -r 96f55e4154c3 sys/lib/libkern/pmatch.c
--- a/sys/lib/libkern/pmatch.c  Thu Jan 21 15:43:37 2021 +0000
+++ b/sys/lib/libkern/pmatch.c  Thu Jan 21 15:44:14 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmatch.c,v 1.6 2009/03/14 21:04:24 dsl Exp $   */
+/*     $NetBSD: pmatch.c,v 1.7 2021/01/21 15:44:14 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1980, 1991 The Regents of the University of California.
@@ -30,7 +30,14 @@
  */
 
 #include <sys/param.h>
+
+/* So we can build this in userland for the tests in strlist.c */
+#if defined(_KERNEL) || defined(_STANDALONE)
 #include <lib/libkern/libkern.h>
+#else
+int pmatch(const char *, const char *, const char **);
+#endif
+
 /*
  * pmatch():
  *     Return 2 on exact match.



Home | Main Index | Thread Index | Old Index