]> granicus.if.org Git - sudo/commitdiff
Protect call to setlocale() with HAVE_SETLOCALE
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 5 Jan 2011 21:27:44 +0000 (16:27 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 5 Jan 2011 21:27:44 +0000 (16:27 -0500)
plugins/sudoers/iolog_path.c

index cf0a49d1a091319d28dde412394934adcbb907a0..23345ca18ff0dda6facc2f99e0bbf96a262427ab 100644 (file)
@@ -245,7 +245,9 @@ expand_iolog_path(const char *prefix, const char *dir, const char *file,
            buf = erealloc(buf, psize);
            buf[psize - 1] = '\0';
        } while (!strftime(buf, psize, path, timeptr) || buf[psize - 1] != '\0');
+#ifdef HAVE_SETLOCALE
        setlocale(LC_ALL, "");
+#endif
        if (slashp)
            *slashp = buf + (*slashp - path);
        efree(path);