Skip to content

Commit

Permalink
m4: crypt_xpg6.m4 - Define _DEFAULT_SOURCE for current glibc
Browse files Browse the repository at this point in the history
Current glibc no longer implements the CRYPT extension, so it does not
declare crypt in <unistd.h> in strict standard modes.  The check
defines _XOPEN_SOURCE, which enables one of these modes.  Defining
_DEFAULT_SOURCE as well again makes available the crypt function
prototype.

This avoids a configure check result change with compilers which do
not support implicit function declarations.
  • Loading branch information
fweimer-rh authored and sirainen committed Jan 2, 2023
1 parent d7705bc commit dd691d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions m4/crypt_xpg6.m4
Expand Up @@ -6,6 +6,7 @@ AC_DEFUN([DOVECOT_CRYPT_XPG6], [
#define _XOPEN_SOURCE 4
#define _XOPEN_SOURCE_EXTENDED 1
#define _XOPEN_VERSION 4
#define _DEFAULT_SOURCE
#define _XPG4_2
#define _XPG6
#include <unistd.h>
Expand Down

0 comments on commit dd691d4

Please sign in to comment.