sfeed_plain: use setlocale() for glibc
this is required for mbtowc for glibc (not required in musl or on OpenBSD).
This commit is contained in:
parent
cfd9f1f73a
commit
e2719867bc
|
@ -1,5 +1,6 @@
|
|||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <locale.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -53,6 +54,11 @@ main(int argc, char *argv[])
|
|||
char *name;
|
||||
int i;
|
||||
|
||||
if (pledge("stdio rpath", NULL) == -1)
|
||||
err(1, "pledge");
|
||||
|
||||
setlocale(LC_CTYPE, "");
|
||||
|
||||
if (pledge(argc == 1 ? "stdio" : "stdio rpath", NULL) == -1)
|
||||
err(1, "pledge");
|
||||
|
||||
|
|
Loading…
Reference in New Issue