Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX FOR V2024.05] lib: fix build error using legacy VIRTIO_DEVICE/DRIVER_ONLY #594

Merged
merged 1 commit into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions lib/include/openamp/virtio.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,21 @@ extern "C" {
#define VIRTIO_DEV_DRIVER 0UL
#define VIRTIO_DEV_DEVICE 1UL

#if !defined(VIRTIO_DRIVER_SUPPORT) && !defined(VIRTIO_DEVICE_SUPPORT)
#ifdef VIRTIO_DRIVER_ONLY
#warning "VIRTIO_DRIVER_ONLY is deprecated, please use VIRTIO_DEVICE_SUPPORT=0"
#endif

#ifdef VIRTIO_DEVICE_ONLY
#define VIRTIO_DRIVER_SUPPORT 1
#define VIRTIO_DEVICE_SUPPORT 0
#elif VIRTIO_DEVICE_ONLY
#warning "VIRTIO_DEVICE_ONLY is deprecated, please use VIRTIO_DRIVER_SUPPORT=0"
#endif
#define VIRTIO_DRIVER_SUPPORT 0
#define VIRTIO_DEVICE_SUPPORT 1
#else
#warning "VIRTIO_DRIVER_SUPPORT and/or VIRTIO_DEVICE_SUPPORT should be defined"
#define VIRTIO_DRIVER_SUPPORT 1
#define VIRTIO_DEVICE_SUPPORT 1
#endif /* VIRTIO_DRIVER_ONLY */
#endif /*!defined(VIRTIO_DRIVER_SUPPORT) && !defined(VIRTIO_DEVICE_SUPPORT)*/

#define VIRTIO_ENABLED(option) (option == 1)

Expand Down
Loading