From: Bruno Haible Date: Sun, 25 May 2025 17:11:52 +0000 (+0200) Subject: utime-h: Fix error in C++ mode with MSVC. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=942fe1ce562aa06f08d6d35b0faff228b796878b;p=thirdparty%2Fgnulib.git utime-h: Fix error in C++ mode with MSVC. * lib/utime.in.h (utime): Use _GL_CXXALIAS_MDA_CAST instead of _GL_CXXALIAS_MDA. --- diff --git a/ChangeLog b/ChangeLog index f2ccb1fb94..a024ef7e40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-05-25 Bruno Haible + + utime-h: Fix error in C++ mode with MSVC. + * lib/utime.in.h (utime): Use _GL_CXXALIAS_MDA_CAST instead of + _GL_CXXALIAS_MDA. + 2025-05-22 Collin Funk stdckdint-h: Don't generate header if it is not needed. diff --git a/lib/utime.in.h b/lib/utime.in.h index 0ac9993f9d..10ba32ccec 100644 --- a/lib/utime.in.h +++ b/lib/utime.in.h @@ -106,7 +106,9 @@ _GL_WARN_ON_USE (utime, # undef utime # define utime _utime # endif -_GL_CXXALIAS_MDA (utime, int, (const char *filename, const struct utimbuf *ts)); +/* Need to cast, because on MSVC, the second parameter is of type + 'struct _utimbuf *'. */ +_GL_CXXALIAS_MDA_CAST (utime, int, (const char *filename, const struct utimbuf *ts)); # else _GL_CXXALIAS_SYS (utime, int, (const char *filename, const struct utimbuf *ts)); # endif