Codebase list cyrus-sasl2 / debian/2.1.27_101-g0780600+dfsg-3 debian / patches / 0007-Define-_XOPEN_SOURCE-in-auth_shadow.c-to-get-proper-.patch
debian/2.1.27_101-g0780600+dfsg-3

Tree @debian/2.1.27_101-g0780600+dfsg-3 (Download .tar.gz)

0007-Define-_XOPEN_SOURCE-in-auth_shadow.c-to-get-proper-.patch @debian/2.1.27_101-g0780600+dfsg-3raw · history · blame

From: Debian Cyrus SASL Team
 <pkg-cyrus-sasl2-debian-devel@lists.alioth.debian.org>
Date: Thu, 24 Mar 2016 11:35:03 +0100
Subject: Define _XOPEN_SOURCE in auth_shadow.c to get proper crypt() prototype
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

will define a correct function prototype for the crypt function.  This avoids
segfaults on architectures where the size of a pointer is greater than the size
of an integer (ia64 and amd64 are examples).  This may be detected by looking
for build log lines such as the following:
auth_shadow.c:183: warning: implicit declaration of function ‘crypt’
auth_shadow.c:183: warning: cast to pointer from integer of different size
---
 saslauthd/auth_shadow.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/saslauthd/auth_shadow.c b/saslauthd/auth_shadow.c
index d69e380..68d1cdd 100644
--- a/saslauthd/auth_shadow.c
+++ b/saslauthd/auth_shadow.c
@@ -39,6 +39,7 @@
 
 #ifdef AUTH_SHADOW
 
+#define _XOPEN_SOURCE
 #define PWBUFSZ 256 /***SWB***/
 
 # include <unistd.h>