# HG changeset patch # User Raphaël Gomès # Date 2021-10-20 16:25:49 # Node ID 126feb805247ab25fca6fc2d84670b4cddcf476c # Parent 249d1888e9d8ff9dbb4c980f73bf1032ad341eb5 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 diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c --- a/mercurial/cext/parsers.c +++ b/mercurial/cext/parsers.c @@ -270,11 +270,16 @@ static PyObject *dirstate_item_v2_data(d #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); };