void-packages/srcpkgs/dmenu/patches/setlocale_segfault.patch

12 lines
386 B
Diff

--- draw.c.orig 2012-12-16 06:41:04.477405084 +0100
+++ draw.c 2012-12-16 06:41:34.027700813 +0100
@@ -95,7 +95,7 @@ DC *
initdc(void) {
DC *dc;
- if(!setlocale(LC_CTYPE, "") || !XSupportsLocale())
+ if(!setlocale(LC_CTYPE, NULL) || !XSupportsLocale())
fputs("no locale support\n", stderr);
if(!(dc = calloc(1, sizeof *dc)))
eprintf("cannot malloc %u bytes:", sizeof *dc);