File: 0001-3rdparty-iaxclient-fix-declaration-of-openal_initial.patch

package info (click to toggle)
flightgear 1%3A2020.3.19%2Bdfsg-1.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,168 kB
  • sloc: cpp: 245,588; ansic: 181,318; sh: 13,686; perl: 4,475; python: 3,139; xml: 899; asm: 642; makefile: 347; java: 314
file content (65 lines) | stat: -rw-r--r-- 2,127 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
From 9bdee0b09061bf5ed079a3db0449020df7c92c08 Mon Sep 17 00:00:00 2001
From: Florent Rougon <f.rougon@frougon.net>
Date: Wed, 7 May 2025 14:46:31 +0200
Subject: 3rdparty/iaxclient: fix declaration of openal_initialize()

In audio_openal.h, openal_initialize() was declared without any
parameter specified, however the definition takes two. This was valid in
pre-ANSI C (K&R function declarations) but was removed in C23 and is
apparently already causing problems:

  https://sourceforge.net/p/flightgear/mailman/message/59181327/

Also move #include "audio_openal.h" from iaxclient_lib.h to where it is
actually needed (iaxclient_lib.c).
---
 3rdparty/iaxclient/lib/audio_openal.h  | 2 +-
 3rdparty/iaxclient/lib/iaxclient_lib.c | 4 ++++
 3rdparty/iaxclient/lib/iaxclient_lib.h | 4 ----
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/3rdparty/iaxclient/lib/audio_openal.h b/3rdparty/iaxclient/lib/audio_openal.h
index a698235ad..de7cbc866 100644
--- a/3rdparty/iaxclient/lib/audio_openal.h
+++ b/3rdparty/iaxclient/lib/audio_openal.h
@@ -1,6 +1,6 @@
 #ifndef _AUDIO_OPENAL_H
 #define _AUDIO_OPENAL_H
 
-int openal_initialize();
+int openal_initialize(struct iaxc_audio_driver *d, int sample_rate);
 
 #endif
diff --git a/3rdparty/iaxclient/lib/iaxclient_lib.c b/3rdparty/iaxclient/lib/iaxclient_lib.c
index 9ffa0ece2..35b5b6c77 100644
--- a/3rdparty/iaxclient/lib/iaxclient_lib.c
+++ b/3rdparty/iaxclient/lib/iaxclient_lib.c
@@ -47,6 +47,10 @@
 #include "audio_alsa.h"
 #endif
 
+#ifdef AUDIO_OPENAL
+  #include "audio_openal.h"
+#endif
+
 #define IAXC_ERROR  IAXC_TEXT_TYPE_ERROR
 #define IAXC_STATUS IAXC_TEXT_TYPE_STATUS
 #define IAXC_NOTICE IAXC_TEXT_TYPE_NOTICE
diff --git a/3rdparty/iaxclient/lib/iaxclient_lib.h b/3rdparty/iaxclient/lib/iaxclient_lib.h
index 91776c335..d98dc4516 100644
--- a/3rdparty/iaxclient/lib/iaxclient_lib.h
+++ b/3rdparty/iaxclient/lib/iaxclient_lib.h
@@ -242,10 +242,6 @@ struct iaxc_call {
 
 #include "audio_file.h"
 
-#ifdef AUDIO_OPENAL
-  #include "audio_openal.h"
-#endif
-
 extern int iaxci_audio_output_mode;
 
 int iaxci_post_event_callback(iaxc_event e);
-- 
2.30.2