projects/guix·blob python-team · refs

83 lines · 2.2 KiB

1From f930c3b81bdf9c05152fb005562b3869f6e36f34 Mon Sep 17 00:00:00 2001
2From: "Azamat H. Hackimov" <[email protected]>
3Date: Thu, 4 Jun 2020 20:41:25 +0300
4Subject: [PATCH] Fix GCC10 compilation
5
6---
7 mpg321.c | 8 ++++++++
8 mpg321.h | 16 ++++++++--------
9 2 files changed, 16 insertions(+), 8 deletions(-)
10
11diff --git a/mpg321.c b/mpg321.c
12index 19282bb..663882e 100644
13--- a/mpg321.c
14+++ b/mpg321.c
15@@ -63,6 +63,14 @@
16 #include <pthread.h>
17 #include <semaphore.h>
18
19+output_frame *Output_Queue;
20+decoded_frames *Decoded_Frames;
21+int semarray;
22+int mad_decoder_position;
23+int output_buffer_position;
24+double real[FFT_BUFFER_SIZE];
25+double imag[FFT_BUFFER_SIZE];
26+int loop_remaining;
27
28 int pflag = 0;
29 int volume = 0;
30diff --git a/mpg321.h b/mpg321.h
31index 798bff0..235cf4a 100644
32--- a/mpg321.h
33+++ b/mpg321.h
34@@ -116,7 +116,7 @@ extern char *playlist_file;
35 extern int quit_now;
36 extern char remote_input_buf[PATH_MAX + 5];
37 extern int file_change;
38-int loop_remaining;
39+extern int loop_remaining;
40
41 extern int status;
42 extern int scrobbler_time;
43@@ -233,8 +233,8 @@ RETSIGTYPE handle_sigchld(int sig);
44 #define FFT_BUFFER_SIZE_LOG 9
45 #define FFT_BUFFER_SIZE (1 << FFT_BUFFER_SIZE_LOG) /* 512 */
46 /*Temporary data stores to perform FFT in */
47-double real[FFT_BUFFER_SIZE];
48-double imag[FFT_BUFFER_SIZE];
49+extern double real[FFT_BUFFER_SIZE];
50+extern double imag[FFT_BUFFER_SIZE];
51
52 typedef struct {
53 double real[FFT_BUFFER_SIZE];
54@@ -258,10 +258,10 @@ fft_state *fft_init(void);
55 /* Output buffer process */
56 void frame_buffer_p();
57 /* Semaphore array */
58-int semarray;
59+extern int semarray;
60 /* Input/Output buffer position */
61-int mad_decoder_position;
62-int output_buffer_position;
63+extern int mad_decoder_position;
64+extern int output_buffer_position;
65 /* Output Frame including needed information */
66 typedef struct {
67 unsigned char data[4*1152];
68@@ -285,10 +285,10 @@ typedef struct {
69 } decoded_frames;
70
71 /* Output frame queue pointer */
72-output_frame *Output_Queue;
73+extern output_frame *Output_Queue;
74
75 /* Shared total decoded frames */
76-decoded_frames *Decoded_Frames;
77+extern decoded_frames *Decoded_Frames;
78
79 #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
80 /* */
81--
822.26.2
83