diff options
author | Gregory Anders <greg@gpanders.com> | 2024-05-29 09:12:38 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-05-29 22:36:25 +0200 |
commit | 5908fd0725034f028ae4aeaa6266ed7c302f3ac2 (patch) | |
tree | 2f171b371c740050e63c24b17eb112a9114b30b8 | |
parent | 9e93d9efdb889b2bc8a57d40fcde780598d8800f (diff) | |
download | aerc-5908fd0725034f028ae4aeaa6266ed7c302f3ac2.tar.gz |
wrap: include xlocale.h header on macOS
Compiling the wrap filter fails on macOS because the locale.h header
does not include declarations for locale_t, freelocale, or newlocale.
Instead, these are included in the xlocale.h header.
We use a conditional include because glibc no longer ships the xlocale.h
header in its distribution.
Signed-off-by: Gregory Anders <greg@gpanders.com>
Acked-by: Robin Jarry <robin@jarry.cc>
-rw-r--r-- | filters/wrap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/filters/wrap.c b/filters/wrap.c index 4ae7c72d..d0d3cfc3 100644 --- a/filters/wrap.c +++ b/filters/wrap.c @@ -15,6 +15,10 @@ #include <wchar.h> #include <wctype.h> +#ifdef __APPLE__ +#include <xlocale.h> +#endif + static void usage(void) { puts("usage: wrap [-h] [-w INT] [-r] [-l INT] [-f FILE]"); |