From a3e203584a1c50019e0eb434fd523bb941bcd308 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Mon, 21 Dec 2020 10:40:02 +0000 Subject: [PATCH] screencast: prefix macros to avoid conflict with system definitions In file included from ../src/screencast/wlr_screencast.c:18: ../include/pipewire_screencast.h:7:9: error: 'ALIGN' macro redefined [-Werror,-Wmacro-redefined] #define ALIGN 16 ^ /usr/include/machine/param.h:79:9: note: previous definition is here #define ALIGN(p) _ALIGN(p) ^ --- include/pipewire_screencast.h | 4 ++-- src/screencast/pipewire_screencast.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/pipewire_screencast.h b/include/pipewire_screencast.h index a90409a..59481ed 100644 --- a/include/pipewire_screencast.h +++ b/include/pipewire_screencast.h @@ -3,8 +3,8 @@ #include "screencast_common.h" -#define BUFFERS 1 -#define ALIGN 16 +#define XDPW_PWR_BUFFERS 1 +#define XDPW_PWR_ALIGN 16 void xdpw_pwr_stream_init(struct xdpw_screencast_instance *cast); int xdpw_pwr_core_connect(struct xdpw_state *state); diff --git a/src/screencast/pipewire_screencast.c b/src/screencast/pipewire_screencast.c index f88af91..a8984c1 100644 --- a/src/screencast/pipewire_screencast.c +++ b/src/screencast/pipewire_screencast.c @@ -115,11 +115,11 @@ static void pwr_handle_stream_param_changed(void *data, uint32_t id, params[0] = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers, - SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(BUFFERS, 1, 32), + SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(XDPW_PWR_BUFFERS, 1, 32), SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(1), SPA_PARAM_BUFFERS_size, SPA_POD_Int(cast->simple_frame.size), SPA_PARAM_BUFFERS_stride, SPA_POD_Int(cast->simple_frame.stride), - SPA_PARAM_BUFFERS_align, SPA_POD_Int(ALIGN)); + SPA_PARAM_BUFFERS_align, SPA_POD_Int(XDPW_PWR_ALIGN)); params[1] = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_ParamMeta, SPA_PARAM_Meta,