git: 1443a455a96e - main - libc: improve include usage for exterror sources
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 18 Feb 2026 07:56:02 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=1443a455a96e587a7b49608def79495e9d74513f
commit 1443a455a96e587a7b49608def79495e9d74513f
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-02-17 20:56:50 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-02-18 07:54:01 +0000
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
---
include/exterr.h | 3 +--
lib/libc/gen/uexterr_format.c | 1 +
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>