aboutsummaryrefslogtreecommitdiff
path: root/package/libpwquality/0001-Fix-build-with-disable-nls-on-platforms-without-libi.patch
blob: 3bae15c221e9dd0754f23dbca12fb9d794b172e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From fd1694c9d85666a39fe39e76518581b1ccd5a6c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20S=C3=B8rensen?= <stefan.sorensen@spectralink.com>
Date: Thu, 2 Feb 2017 11:16:49 +0100
Subject: [PATCH] Fix build with --disable-nls on platforms without libintl
 included in libc.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>

---

Status: accepted upstream, not yet released.

diff --git a/src/pwmake.c b/src/pwmake.c
index 5b8cfb8..81f7cd3 100644
--- a/src/pwmake.c
+++ b/src/pwmake.c
@@ -33,9 +33,11 @@ main(int argc, char *argv[])
         int bits;
         void *auxerror;
 
+#ifdef ENABLE_NLS
         setlocale(LC_ALL, "");
         bindtextdomain("libpwquality", "/usr/share/locale");
         textdomain("libpwquality");
+#endif
 
         if (argc != 2) {
                 usage(basename(argv[0]));
diff --git a/src/pwscore.c b/src/pwscore.c
index 219a175..24c13f2 100644
--- a/src/pwscore.c
+++ b/src/pwscore.c
@@ -34,9 +34,11 @@ main(int argc, char *argv[])
         size_t len;
         char *user = NULL;
 
+#ifdef ENABLE_NLS
         setlocale(LC_ALL, "");
         bindtextdomain("libpwquality", "/usr/share/locale");
         textdomain("libpwquality");
+#endif
 
         if (argc > 2) {
                 usage(basename(argv[0]));
-- 
2.9.3