summaryrefslogtreecommitdiffstats
path: root/source/n/dovecot/dovecot.glibc228.patch
blob: 76ef33aa407170d723b9cf9e7f15252e4e3e7802 (plain) (blame)
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
From 63a74b9e8e0604486a15a879e7f1a27257322400 Mon Sep 17 00:00:00 2001
From: Aki Tuomi <aki.tuomi@dovecot.fi>
Date: Wed, 8 Aug 2018 12:33:20 +0300
Subject: [PATCH] auth: mycrypt - include crypt.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes crypt usage on glibc-2.28

Reported by Reuben Farrelly
Patch provided by Thore Bödecker
---
 configure.ac       | 2 +-
 src/auth/mycrypt.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index dd545ebfdc..c5d8fae666 100644
--- a/configure.ac
+++ b/configure.ac
@@ -315,7 +315,7 @@ AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h malloc.h \
   quota.h sys/fs/quota_common.h \
   mntent.h sys/mnttab.h sys/event.h sys/time.h sys/mkdev.h linux/dqblk_xfs.h \
   xfs/xqm.h execinfo.h ucontext.h malloc_np.h sys/utsname.h sys/vmount.h \
-  sys/utsname.h glob.h linux/falloc.h ucred.h sys/ucred.h)
+  sys/utsname.h glob.h linux/falloc.h ucred.h sys/ucred.h crypt.h)
 
 CC_CLANG
 AC_CC_PIE
diff --git a/src/auth/mycrypt.c b/src/auth/mycrypt.c
index c49fcf842e..0bd00bc238 100644
--- a/src/auth/mycrypt.c
+++ b/src/auth/mycrypt.c
@@ -14,6 +14,9 @@
 #  define _XPG6 /* Some Solaris versions require this, some break with this */
 #endif
 #include <unistd.h>
+#ifdef HAVE_CRYPT_H
+# include <crypt.h>
+#endif
 
 #include "mycrypt.h"