aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2026-02-17 20:56:50 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2026-02-18 07:54:01 +0000
commit1443a455a96e587a7b49608def79495e9d74513f (patch)
tree91781864281589a0b866436ede4aa593028a92f6
parenta03f285afafae243396c9bc7892cbe717a3ac37d (diff)
libc: improve include usage for exterror sources
Include sys/types.h by exterr.h, since size_t is used. Drop include of sys/exterr_cat.h, it is useless for the only prototype provided. Reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55337
-rw-r--r--include/exterr.h3
-rw-r--r--lib/libc/gen/uexterr_format.c1
2 files changed, 2 insertions, 2 deletions
diff --git a/include/exterr.h b/include/exterr.h
index c0273d72ce03..43f1efaef34a 100644
--- a/include/exterr.h
+++ b/include/exterr.h
@@ -11,8 +11,7 @@
#ifndef _EXTERR_H_
#define _EXTERR_H_
-#include <sys/cdefs.h>
-#include <sys/exterr_cat.h>
+#include <sys/types.h>
__BEGIN_DECLS
int uexterr_gettext(char *buf, size_t bufsz);
diff --git a/lib/libc/gen/uexterr_format.c b/lib/libc/gen/uexterr_format.c
index 8d3b458ca9f2..c1974f3c361a 100644
--- a/lib/libc/gen/uexterr_format.c
+++ b/lib/libc/gen/uexterr_format.c
@@ -9,6 +9,7 @@
*/
#include <sys/param.h>
+#include <sys/exterr_cat.h>
#include <sys/exterrvar.h>
#include <exterr.h>
#include <stdbool.h>