1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2025 Mark Johnston <[email protected]> 5 */ 6 7#include <errno.h> 8#include <stdlib.h> 9 10static void __attribute__((constructor)) 11f(void) 12{ 13 errno = 42; 14} 15 16int 17main(void) 18{ 19 /* errno must be zero upon program startup. */ 20 if (errno != 0) 21 exit(1); 22 exit(0); 23} 24 25