Fix clang incompatible function pointer error

This commit is contained in:
yanying 2024-08-05 23:49:02 +08:00
parent 57f81e92a4
commit b622d32d51
2 changed files with 54 additions and 2 deletions

View File

@ -0,0 +1,48 @@
From 0a35fd99e25e085a4826a7e5af4711034fec2eed Mon Sep 17 00:00:00 2001
From: yanying <201250106@smail.nju.edu.cn>
Date: Mon, 5 Aug 2024 23:42:40 +0800
Subject: [PATCH] Fix clang incompatible function pointer error
---
libfreerdp/codec/rfx.c | 4 ++--
winpr/include/winpr/collections.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libfreerdp/codec/rfx.c b/libfreerdp/codec/rfx.c
index ccbc5afe4..eec736558 100644
--- a/libfreerdp/codec/rfx.c
+++ b/libfreerdp/codec/rfx.c
@@ -153,7 +153,7 @@ static void rfx_tile_init(void* obj)
}
}
-static void* rfx_decoder_tile_new(void* val)
+static void* rfx_decoder_tile_new(const void* val)
{
RFX_TILE* tile = NULL;
WINPR_UNUSED(val);
@@ -184,7 +184,7 @@ static void rfx_decoder_tile_free(void* obj)
}
}
-static void* rfx_encoder_tile_new(void* val)
+static void* rfx_encoder_tile_new(const void* val)
{
WINPR_UNUSED(val);
return calloc(1, sizeof(RFX_TILE));
diff --git a/winpr/include/winpr/collections.h b/winpr/include/winpr/collections.h
index 807f011d7..b8c8d9d66 100644
--- a/winpr/include/winpr/collections.h
+++ b/winpr/include/winpr/collections.h
@@ -36,7 +36,7 @@ extern "C"
{
#endif
- typedef void* (*OBJECT_NEW_FN)(void* val);
+ typedef void* (*OBJECT_NEW_FN)(const void* val);
typedef void (*OBJECT_INIT_FN)(void* obj);
typedef void (*OBJECT_UNINIT_FN)(void* obj);
typedef void (*OBJECT_FREE_FN)(void* obj);
--
2.41.0.windows.1

View File

@ -1,6 +1,6 @@
Name: freerdp Name: freerdp
Version: 2.11.7 Version: 2.11.7
Release: 2 Release: 3
Epoch: 2 Epoch: 2
Summary: A Remote Desktop Protocol Implementation Summary: A Remote Desktop Protocol Implementation
License: Apache-2.0 License: Apache-2.0
@ -8,7 +8,8 @@ URL: http://www.freerdp.com
Source0: https://github.com/FreeRDP/FreeRDP/releases/download/%{version}/freerdp-%{version}.tar.gz Source0: https://github.com/FreeRDP/FreeRDP/releases/download/%{version}/freerdp-%{version}.tar.gz
Patch0001: Fix-freerdp-shadow-cli-exit-codes-for-help-and-version.patch Patch0001: Fix-freerdp-shadow-cli-exit-codes-for-help-and-version.patch
Patch0002: CVE-2024-32661.patch Patch0002: CVE-2024-32661.patch
Patch0003: Fix-clang-incompatible-function-pointer-error.patch
BuildRequires: gcc gcc-c++ alsa-lib-devel cmake >= 2.8 cups-devel gsm-devel libXrandr-devel libXv-devel BuildRequires: gcc gcc-c++ alsa-lib-devel cmake >= 2.8 cups-devel gsm-devel libXrandr-devel libXv-devel
BuildRequires: libjpeg-turbo-devel libjpeg-turbo-devel libX11-devel libXcursor-devel libxkbfile-devel BuildRequires: libjpeg-turbo-devel libjpeg-turbo-devel libX11-devel libXcursor-devel libxkbfile-devel
@ -138,6 +139,9 @@ echo "%{_libdir}/freerdp2" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_
%{_mandir}/*/* %{_mandir}/*/*
%changelog %changelog
* Mon Aug 05 2024 yanying <201250106@smail.nju.edu.cn> - 2:2.11.7-3
- Fix clang incompatible function pointer error
* Mon May 06 2024 wangkai <13474090681@163.com> - 2:2.11.7-2 * Mon May 06 2024 wangkai <13474090681@163.com> - 2:2.11.7-2
- Fix CVE-2024-32661 - Fix CVE-2024-32661