1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2025 The FreeBSD Foundation 5 * All rights reserved. 6 * 7 * This software were developed by Konstantin Belousov <kib@FreeBSD.org> 8 * under sponsorship from the FreeBSD Foundation. 9 */ 10 11 #define _WANT_P_OSREL 12 #include <sys/param.h> 13 #include <sys/exterrvar.h> 14 #include "libc_private.h" 15 16 struct uexterror uexterr = { 17 .ver = UEXTERROR_VER, 18 }; 19 20 static void uexterr_ctr(void) __attribute__((constructor)); 21 static void uexterr_ctr(void)22uexterr_ctr(void) 23 { 24 if (__getosreldate() >= P_OSREL_EXTERRCTL) 25 exterrctl(EXTERRCTL_ENABLE, 0, &uexterr); 26 } 27