From d68b50ec032fe4f02bde817abfd30328ec96a11c Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sat, 10 Jul 2021 17:38:01 +0100 Subject: [PATCH] Fix compilation with windows.h from latest w32api MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit misc.h has complex logic (checking MAXSHORT is undefined etc.) controlling if it includes assert.h or not. Including windows.h from w32api 9.0.0 now trips over that, causing assert.h to not be included, causing various errors, e.g. In file included from ../include/cursor.h:53, from ../include/dix.h:54, from ../os/osdep.h:139, from ../hw/xwin/winauth.c:40: ../include/privates.h: In function ‘dixGetPrivateAddr’: ../include/privates.h:121:5: error: implicit declaration of function ‘assert’ [-Werror=implicit-function-declaration] Fix this by IWYU in privates.h --- include/privates.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/privates.h b/include/privates.h index e89c3e440..6e1cfa02e 100644 --- a/include/privates.h +++ b/include/privates.h @@ -15,6 +15,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include +#include #include "misc.h" /*****************************************************************