From e3d0b651180ddbff9198d1bf33028bce251420a9 Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Tue, 1 Jan 2013 12:21:35 -0600 Subject: [PATCH] Set st_dev on Windows as unsigned long to match its DWORD type, related to the change to fix #11939. --- Modules/posixmodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index e53e76cef559..3eec4c014b44 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1955,7 +1955,8 @@ _pystat_fromstructstat(STRUCT_STAT *st) PyStructSequence_SET_ITEM(v, 2, PyLong_FromLongLong((PY_LONG_LONG)st->st_dev)); #else - PyStructSequence_SET_ITEM(v, 2, PyLong_FromLong((long)st->st_dev)); + PyStructSequence_SET_ITEM(v, 2, + PyLong_FromUnsignedLong(st->st_dev)); #endif PyStructSequence_SET_ITEM(v, 3, PyLong_FromLong((long)st->st_nlink)); PyStructSequence_SET_ITEM(v, 4, PyLong_FromLong((long)st->st_uid)); -- 2.47.3