From abdf2ecbefe3f2d0eaedf204131a514d5c9fdcd3 Mon Sep 17 00:00:00 2001 From: Bojan Smojver Date: Tue, 23 May 2023 12:39:28 +1000 Subject: [PATCH] Remove C99 loop initialisation on EPEL7. --- xrdp-0.9.22.1-no-c99.patch | 16 ++++++++++++++++ xrdp.spec | 8 +++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 xrdp-0.9.22.1-no-c99.patch diff --git a/xrdp-0.9.22.1-no-c99.patch b/xrdp-0.9.22.1-no-c99.patch new file mode 100644 index 0000000..9e3d740 --- /dev/null +++ b/xrdp-0.9.22.1-no-c99.patch @@ -0,0 +1,16 @@ +diff -rup xrdp-0.9.22.1-v/sesman/chansrv/sound.c xrdp-0.9.22.1/sesman/chansrv/sound.c +--- xrdp-0.9.22.1-v/sesman/chansrv/sound.c 2023-05-23 10:18:50.000000000 +1000 ++++ xrdp-0.9.22.1/sesman/chansrv/sound.c 2023-05-23 12:35:50.273215167 +1000 +@@ -1116,9 +1116,11 @@ process_pcm_message(int id, int size, st + char *buf = (char *) g_malloc(g_bbuf_size, 0); + if (buf != NULL) + { ++ int i; ++ + silence_start_time = g_time3(); + sending_silence = 1; +- for (int i = 0; i < send_silence_times; i++) ++ for (i = 0; i < send_silence_times; i++) + { + g_memset(buf, 0, g_bbuf_size); + sound_send_wave_data_chunk(buf, g_bbuf_size); diff --git a/xrdp.spec b/xrdp.spec index c1a603a..5047178 100644 --- a/xrdp.spec +++ b/xrdp.spec @@ -17,7 +17,7 @@ Summary: Open source remote desktop protocol (RDP) server Name: xrdp Epoch: 1 Version: 0.9.22.1 -Release: 1%{?dist} +Release: 2%{?dist} License: ASL 2.0 and GPLv2+ and MIT URL: http://www.xrdp.org/ Source0: https://github.com/neutrinolabs/xrdp/releases/download/v%{version}/xrdp-%{version}.tar.gz @@ -38,6 +38,9 @@ Patch6: xrdp-0.9.18-vnc-uninit.patch %if 0%{?fedora} >= 32 || 0%{?rhel} >= 8 Patch7: xrdp-0.9.20-sesman-ini.patch %endif +%if ! 0%{?fedora} && 0%{?rhel} <= 7 +Patch8: xrdp-0.9.22.1-no-c99.patch +%endif BuildRequires: make BuildRequires: gcc @@ -293,6 +296,9 @@ fi %{_datadir}/selinux/*/%{name}.pp %changelog +* Tue May 23 2023 Bojan Smojver - 1:0.9.22.1-2 +- Remove C99 loop initialisation on EPEL7 + * Tue May 23 2023 Bojan Smojver - 1:0.9.22.1-1 - Update to 0.9.22.1