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/9cad4e1a491b
branches:  trunk
changeset: 950223:9cad4e1a491b
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 350aa3e3a0f7 -r 9cad4e1a491b 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