mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	src/pipewire/utils.h: fix build without reallocarray
Fix the following build failure without reallocarray (e.g. on uclibc): /home/buildroot/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mipsel-buildroot-linux-uclibc/10.3.0/../../../../mipsel-buildroot-linux-uclibc/bin/ld: src/pipewire/libpipewire-0.3.so.0.351.0.p/introspect.c.o: in function `pw_node_info_merge': /home/buildroot/autobuild/instance-0/output-1/build/pipewire-0.3.51/build/../src/pipewire/introspect.c:216: undefined reference to `reallocarray' Fixes: - http://autobuild.buildroot.org/results/374582f75713c4116ae23f972c5bc55214879502 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
This commit is contained in:
		
							parent
							
								
									bd37d78a8c
								
							
						
					
					
						commit
						0708a39b43
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		|  | @ -29,6 +29,7 @@ | |||
| extern "C" { | ||||
| #endif | ||||
| 
 | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| #include <sys/un.h> | ||||
| #ifndef _POSIX_C_SOURCE | ||||
|  | @ -86,6 +87,10 @@ pw_strip(char *str, const char *whitespace); | |||
| #endif | ||||
| 
 | ||||
| ssize_t pw_getrandom(void *buf, size_t buflen, unsigned int flags); | ||||
| 
 | ||||
| #if !defined(reallocarray) | ||||
| # define reallocarray(ptr, nmemb, size)		realloc(ptr, nmemb * size) | ||||
| #endif | ||||
| /**
 | ||||
|  * \} | ||||
|  */ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Fabrice Fontaine
						Fabrice Fontaine