mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-22 06:35:57 +01:00
Fix build after 7d3da7e968
(#54)
This commit is contained in:
parent
7d3da7e968
commit
f9f08c802e
1 changed files with 0 additions and 26 deletions
|
@ -613,32 +613,6 @@ static void wlr_init_xdg_outputs(struct xdpw_screencast_context *ctx) {
|
|||
}
|
||||
}
|
||||
|
||||
// stolen from LLVM cuz it wouldnt include lol
|
||||
static inline int vasprintf(char **strp, const char *fmt, va_list ap) {
|
||||
const size_t buff_size = 256;
|
||||
if ((*strp = (char *)malloc(buff_size)) == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
va_list ap_copy;
|
||||
// va_copy may not be provided by the C library in C++ 03 mode.
|
||||
#if defined(_LIBCPP_CXX03_LANG) && __has_builtin(__builtin_va_copy)
|
||||
__builtin_va_copy(ap_copy, ap);
|
||||
#else
|
||||
va_copy(ap_copy, ap);
|
||||
#endif
|
||||
int str_size = vsnprintf(*strp, buff_size, fmt, ap_copy);
|
||||
va_end(ap_copy);
|
||||
|
||||
if ((size_t)str_size >= buff_size) {
|
||||
if ((*strp = (char *)realloc(*strp, str_size + 1)) == NULL) {
|
||||
return -1;
|
||||
}
|
||||
str_size = vsnprintf(*strp, str_size + 1, fmt, ap);
|
||||
}
|
||||
return str_size;
|
||||
}
|
||||
|
||||
char *buildWindowList(struct xdpw_screencast_context *ctx) {
|
||||
char *rolling = calloc(1, 1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue