changeset 48280:126feb805247

parsers: don't ask about symlinks on platforms that don't support them Otherwise the compiler gets quite sad. Differential Revision: https://phab.mercurial-scm.org/D11712
author Raphaël Gomès <rgomes@octobus.net>
date Wed, 20 Oct 2021 18:25:49 +0200
parents 249d1888e9d8
children 8f54d9c79b12
files mercurial/cext/parsers.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cext/parsers.c	Wed Oct 20 18:05:16 2021 +0200
+++ b/mercurial/cext/parsers.c	Wed Oct 20 18:25:49 2021 +0200
@@ -270,11 +270,16 @@
 #else
 	flags &= ~dirstate_flag_mode_exec_perm;
 #endif
+#ifdef S_ISLNK
+	/* This is for platforms with support for symlinks */
 	if (S_ISLNK(mode)) {
 		flags |= dirstate_flag_mode_is_symlink;
 	} else {
 		flags &= ~dirstate_flag_mode_is_symlink;
 	}
+#else
+	flags &= ~dirstate_flag_mode_is_symlink;
+#endif
 	return Py_BuildValue("iiii", flags, self->size, self->mtime_s,
 	                     self->mtime_ns);
 };