Source: Restore compilation on FreeBSD

Since commit bda67b82e7 (instrumentation: Write cmakeBuild snippet when
build is interrupted, 2026-06-15) compilation on FreeBSD fails with:

    error: use of undeclared identifier 'isascii'

Follow our pattern from `cmTimestamp.cxx` to make `isascii` available.
This commit is contained in:
Brad King
2026-06-19 11:18:12 -04:00
parent bda67b82e7
commit b5c03bdef4

View File

@@ -7,6 +7,11 @@
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _POSIX_C_SOURCE 200809L
#endif
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__QNX__)
// For isascii
// NOLINTNEXTLINE(bugprone-reserved-identifier)
# define _XOPEN_SOURCE 700
#endif
#include "cmInstrumentationInterrupt.h"