[host] capture: fix compilation with NvFBC C++ sources

The prior commit to expose the FrameBuffer internals makes use of an
atomic from `stdatomic.h`. Unfortunatly C++ has no notion of _Atomic and
as such `stdatomic.h` is not compatible. To work around this we instead
just forward declare the type here.
This commit is contained in:
Geoffrey McRae 2022-05-16 22:09:11 +10:00
parent 53c843d9dd
commit 6b9fa2b628

View File

@ -22,9 +22,16 @@
#include <stdbool.h>
#include <stdint.h>
#include "common/framebuffer.h"
#include "common/KVMFR.h"
#ifdef __cplusplus
/* using common/framebuffer.h breaks compatibillity with C++ due to it's usage
* of stdatomic.h, so we need to forward declare the structure here */
typedef struct stFrameBuffer FrameBuffer;
#else
#include "common/framebuffer.h"
#endif
typedef enum CaptureResult
{
CAPTURE_RESULT_OK ,