From bd58998d044ef3a2db96f0290d26f5879728b8dd Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 12 Apr 2023 13:16:16 +0200 Subject: [PATCH] Fixed S_ISDIR --- src/templates_text/templator_text.org | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/templates_text/templator_text.org b/src/templates_text/templator_text.org index 9ed7858..1e7f140 100644 --- a/src/templates_text/templator_text.org +++ b/src/templates_text/templator_text.org @@ -145,10 +145,10 @@ trexio_text_inquire (const char* file_name) if (file_exists) { bool is_a_directory = false; -#ifdef S_IFDIR +#if defined(S_IFDIR) is_a_directory = st.st_mode & S_IFDIR; -#elif S_ISDIR - is_a_directory = S_ISDIR(s.st_mode); +#elif defined(S_ISDIR) + is_a_directory = S_ISDIR(st.st_mode); #else printf("Some important macros are missing for directory handling.\n"); return TREXIO_FAILURE;