summaryrefslogtreecommitdiffstats
path: root/build/has/strerror-l.c
diff options
context:
space:
mode:
Diffstat (limited to 'build/has/strerror-l.c')
-rw-r--r--build/has/strerror-l.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/build/has/strerror-l.c b/build/has/strerror-l.c
new file mode 100644
index 0000000..3dcc4d7
--- /dev/null
+++ b/build/has/strerror-l.c
@@ -0,0 +1,11 @@
+// Copyright © Tavian Barnes <tavianator@tavianator.com>
+// SPDX-License-Identifier: 0BSD
+
+#include <errno.h>
+#include <locale.h>
+#include <string.h>
+
+int main(void) {
+ locale_t locale = duplocale(LC_GLOBAL_LOCALE);
+ return !strerror_l(ENOMEM, locale);
+}