Skip to contentSkip to conversation

hw/display/edid: Add missing 'qdev-properties.h' header

PATCH In review Philippe Mathieu-Daudé 2 participants 2 messages May 18, 2020 – May 19, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 hw/display/edid: Add missing 'qdev-properties.h' header

When trying to consume the DEFINE_EDID_PROPERTIES() macro by including "hw/display/edid.h", we get this build failure:

  include/hw/display/edid.h:24:5: error: implicit declaration of
  function ‘DEFINE_PROP_UINT32’ [-Werror=implicit-function-declaration]
     24 |     DEFINE_PROP_UINT32("xres", _state, _edid_info.prefx, 0),    \
        |     ^~~~~~~~~~~~~~~~~~

Headers should be self-contained, and one shouldn't have to dig to find the missing headers.
In this case "hw/qdev-properties.h" is missing. Add it.

---
Since v1: reworded description (rth)

Supersedes: <[email protected]>

---
 include/hw/display/edid.h | 1 +
 1 file changed, 1 insertion(+)
include/hw/display/edid.h +1 -0
index ff99dc0a05..23371ee82c 100644
@@ -2,6 +2,7 @@
 #define EDID_H
 
 #include "qom/object.h"
+#include "hw/qdev-properties.h"
 
 typedef struct qemu_edid_info {
     const char *vendor; /* http://www.uefi.org/pnp_id_list */
Signature · 1 line
2.21.3
Reviewed-by on v2 1/1
#1 lore raw
Quoted 12 lines · Philippe Mathieu-Daudé

When trying to consume the DEFINE_EDID_PROPERTIES() macro by including "hw/display/edid.h", we get this build failure:

  include/hw/display/edid.h:24:5: error: implicit declaration of
  function ‘DEFINE_PROP_UINT32’ [-Werror=implicit-function-declaration]
     24 |     DEFINE_PROP_UINT32("xres", _state, _edid_info.prefx, 0),    \
        |     ^~~~~~~~~~~~~~~~~~

Headers should be self-contained, and one shouldn't have to dig to find the missing headers.
In this case "hw/qdev-properties.h" is missing. Add it.

Quoted 8 lines

---
Since v1: reworded description (rth)

Supersedes: <[email protected]>

---
 include/hw/display/edid.h | 1 +
 1 file changed, 1 insertion(+)

r~