[PATCH] configure: fix mktemp call for macOS

Ralph Seichter abbot at monksofcool.net
Tue Jun 11 17:26:39 PDT 2019


The mktemp call in configure is incompatible with /usr/bin/mktemp as
shipped with macOS, where it fails due to a missing parameter. I added
the missing template, and the call is now working with both Apple's
and GNU coreutils' mktemp.

Signed-off-by: Ralph Seichter <abbot at monksofcool.net>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 8b80f0e0..feebafcc 100755
--- a/configure
+++ b/configure
@@ -529,7 +529,7 @@ int main () {
     return 0;
 }
 EOF
-    if ! TEMP_GPG=$(mktemp -d); then
+    if ! TEMP_GPG=$(mktemp -d /tmp/notmuch.XXXXXX); then
         printf 'No.\nCould not make tempdir for testing session-key support.\n'
         errors=$((errors + 1))
     elif ${CC} ${CFLAGS} ${gmime_cflags} _check_session_keys.c ${gmime_ldflags} -o _check_session_keys \
-- 
2.21.0



More information about the notmuch mailing list