summaryrefslogtreecommitdiff
path: root/sys/external/bsd/drm2/include/linux
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2021-12-19 12:22:03 +0000
committerriastradh <riastradh@NetBSD.org>2021-12-19 12:22:03 +0000
commitef9f2a6fad34fc31a68bc829705e7b02e7c423fa (patch)
tree05e63f30373879b52dede218eed3fd84fae3372d /sys/external/bsd/drm2/include/linux
parentd11da81ea7e5dbe26559aa46ab658de8d9b12854 (diff)
drm: Knuckle under and define sprintf in nbsd-namespace.h.
Diffstat (limited to 'sys/external/bsd/drm2/include/linux')
-rw-r--r--sys/external/bsd/drm2/include/linux/nbsd-namespace.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/external/bsd/drm2/include/linux/nbsd-namespace.h b/sys/external/bsd/drm2/include/linux/nbsd-namespace.h
index 71bb2af7aa3..66301cbe04a 100644
--- a/sys/external/bsd/drm2/include/linux/nbsd-namespace.h
+++ b/sys/external/bsd/drm2/include/linux/nbsd-namespace.h
@@ -1,4 +1,4 @@
-/* $NetBSD: nbsd-namespace.h,v 1.3 2021/12/19 09:59:22 riastradh Exp $ */
+/* $NetBSD: nbsd-namespace.h,v 1.4 2021/12/19 12:22:03 riastradh Exp $ */
/*-
* Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -46,4 +46,7 @@
/* Disable our historic malloc(9) compatibility macro. */
#undef free
+/* This should not appear in NetBSD code -- we do not sprintf! */
+#define sprintf(BUF, FMT, ARGS...) snprintf(BUF, SIZE_MAX, FMT, ##ARGS)
+
#endif /* _LINUX_NBSD_NAMESPACE_H_ */