]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
m4: crypt_xpg6.m4 - Define _DEFAULT_SOURCE for current glibc
authorFlorian Weimer <fweimer@redhat.com>
Mon, 2 Jan 2023 09:38:18 +0000 (10:38 +0100)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Mon, 2 Jan 2023 15:10:20 +0000 (15:10 +0000)
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.

m4/crypt_xpg6.m4

index 0085b2ac769920bae0def76bd04539de19961d81..3a288a3713a6f325e4e5dafcd170b9b856a94f7e 100644 (file)
@@ -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>