spice-protocol/spice
Frediano Ziglio ccda863268 vd_agent: Do not define structures without fields
According to C standard the size of a structure without fields is
not defined (see
https://stackoverflow.com/questions/21851930/size-of-empty-structure-in-c-and-c).
As we almost only use GCC currently these structures are of size 0.
This can became a problem if 2 sides talking a given protocol use
these structures.
To avoid such possible mismatch (for instance having one side C and
the other C++ which defines these structures as having 1 as size) add
an empty (0-size array) field.
Although a 0-size array is not considered also that portable we use
extensively this feature with different compilers never encountering
issues.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
2018-05-31 17:20:54 +01:00
..
barrier.h Use gcc builtin rather than asm for memory barriers 2016-01-08 15:31:38 +01:00
controller_prot.h Define and use new SPICE_MAGIC_CONST macro 2015-08-12 14:15:27 +02:00
end-packed.h mingw32: specify packing alignment to 1 byte, to override -mms-bitfield 2010-12-29 16:13:55 +01:00
enums.h Allow to specify a surface will be streamed 2017-12-01 15:53:44 +00:00
error_codes.h Clean up and standardize header guards 2010-02-04 16:47:14 +01:00
foreign_menu_prot.h Define and use new SPICE_MAGIC_CONST macro 2015-08-12 14:15:27 +02:00
ipc_ring.h Fix up SPICE_SPICE typo 2010-02-04 18:10:50 +01:00
macros.h macros: Use Visual C++ built-ins for byte swapping if available 2018-03-09 15:41:09 +00:00
Makefile.am Add support for building with meson 2018-05-08 10:38:22 +01:00
meson.build Add support for building with meson 2018-05-08 10:38:22 +01:00
protocol.h streaming: define max of number of concurrent streams 2018-05-05 12:52:11 +01:00
qxl_dev.h Define and use new SPICE_MAGIC_CONST macro 2015-08-12 14:15:27 +02:00
qxl_windows.h Add QXL_ESCAPE_MONITOR_CONFIG enum 2015-06-30 16:23:42 +02:00
start-packed.h mingw32: specify packing alignment to 1 byte, to override -mms-bitfield 2010-12-29 16:13:55 +01:00
stats.h Define and use new SPICE_MAGIC_CONST macro 2015-08-12 14:15:27 +02:00
stream-device.h stream-device: Define an enumeration to store capabilities constants 2018-04-11 12:31:08 +01:00
types.h Add byteswapping macros 2010-05-19 16:02:40 +02:00
vd_agent.h vd_agent: Do not define structures without fields 2018-05-31 17:20:54 +01:00
vdi_dev.h Define and use new SPICE_MAGIC_CONST macro 2015-08-12 14:15:27 +02:00