gfx: #undef quad

Surprisingly, esp-idf #includes files such as sys/types.h when pulling
other standard header files, even when not explicitly defined. While
this is not a serious issue, incredibly their sys/types.h implementation
uses "#define quad", therefore breaking user code such as anything
related to "struct quad".
This commit is contained in:
Xavier Del Campo Romero 2024-01-30 00:45:27 +01:00
parent a27a35bd77
commit 158ad29d14
Signed by: xavi
GPG Key ID: 84FF3612A9BF43F2
3 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,8 @@
#include <stdbool.h>
#undef quad
#ifdef __cplusplus
extern "C"
{

View File

@ -4,6 +4,8 @@
#include <stddef.h>
#include <stdlib.h>
#undef quad
int quad_from_sprite(const struct sprite *const s, struct quad *const q)
{
return -1;

View File

@ -1,9 +1,9 @@
#ifndef GFX_H
#define GFX_H
#include <gfx/port.h>
#include <stdbool.h>
#include <stdio.h>
#include <gfx/port.h>
#ifdef __cplusplus
extern "C"