summaryrefslogtreecommitdiff
path: root/www/waterfox/files/patch-bug1659612
blob: a7aea97734a0fca7fbf5a34eafa2c088026cee28 (plain) (blame)
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
media/libcubeb/src/cubeb_alsa.c:613:9: error: implicitly declaring library function 'snprintf' with type 'int (char *, unsigned int, const char *, ...)' [-Werror,-Wimplicit-function-declaration]
    r = snprintf(node_name, sizeof(node_name), "pcm.%s", string);
        ^
media/libcubeb/src/cubeb_alsa.c:613:9: note: include the header <stdio.h> or explicitly provide a declaration for 'snprintf'
media/libcubeb/src/cubeb_alsa.c:1168:3: error: implicitly declaring library function 'alloca' with type 'void *(unsigned int)' [-Werror,-Wimplicit-function-declaration]
  snd_pcm_hw_params_alloca(&hw_params);
  ^
/usr/local/include/alsa/pcm.h:737:39: note: expanded from macro 'snd_pcm_hw_params_alloca'
#define snd_pcm_hw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_hw_params)
                                      ^
/usr/local/include/alsa/global.h:106:57: note: expanded from macro '__snd_alloca'
#define __snd_alloca(ptr,type) do { *ptr = (type##_t *) alloca(type##_sizeof()); memset(*ptr, 0, type##_sizeof()); } while (0)
                                                        ^
media/libcubeb/src/cubeb_alsa.c:1168:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'alloca'
/usr/local/include/alsa/pcm.h:737:39: note: expanded from macro 'snd_pcm_hw_params_alloca'
#define snd_pcm_hw_params_alloca(ptr) __snd_alloca(ptr, snd_pcm_hw_params)
                                      ^
/usr/local/include/alsa/global.h:106:57: note: expanded from macro '__snd_alloca'
#define __snd_alloca(ptr,type) do { *ptr = (type##_t *) alloca(type##_sizeof()); memset(*ptr, 0, type##_sizeof()); } while (0)
                                                        ^
2 errors generated.

--- media/libcubeb/src/cubeb_alsa.c.orig	2023-03-29 20:51:00.139281000 +0200
+++ media/libcubeb/src/cubeb_alsa.c	2023-03-29 20:51:46.219013000 +0200
@@ -5,12 +5,16 @@
  * accompanying file LICENSE for details.
  */
 #undef NDEBUG
+#if defined(__FreeBSD__)
+#define _GNU_SOURCE
+#else
 #define _DEFAULT_SOURCE
 #define _BSD_SOURCE
 #if defined(__NetBSD__)
 #define _NETBSD_SOURCE /* timersub() */
 #endif
 #define _XOPEN_SOURCE 500
+#endif
 #include "cubeb-internal.h"
 #include "cubeb/cubeb.h"
 #include "cubeb_tracing.h"