krb5 commit: Fix Windows regression in prof_file.c

Greg Hudson ghudson at mit.edu
Thu Aug 27 12:34:49 EDT 2015


https://github.com/krb5/krb5/commit/4896c7e43725d2690e2adb0d49040c9bc594744b
commit 4896c7e43725d2690e2adb0d49040c9bc594744b
Author: Thomas Sondergaard <thomas.sondergaard at karoshealth.com>
Date:   Wed Aug 12 21:09:42 2015 +0200

    Fix Windows regression in prof_file.c
    
    Commit 13bfcda8de68 (Add support for directories in profile paths)
    introduced use of S_ISDIR, but this macro is not defined by Windows
    SDK stat.h.
    
    ticket: 8030

 src/util/profile/prof_file.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/util/profile/prof_file.c b/src/util/profile/prof_file.c
index 08c0dd0..d774593 100644
--- a/src/util/profile/prof_file.c
+++ b/src/util/profile/prof_file.c
@@ -27,6 +27,9 @@
 #include <io.h>
 #define HAVE_STAT
 #define stat _stat
+#ifndef S_ISDIR
+#define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR)
+#endif
 #endif
 
 #include "k5-platform.h"


More information about the cvs-krb5 mailing list