mirror of
https://abf.rosa.ru/djam/chromium-browser-stable-slava86.git
synced 2025-02-23 15:32:54 +00:00
36 lines
954 B
Diff
36 lines
954 B
Diff
Upstream commit added this code:
|
|
https://github.com/wayland-project/wayland/commit/4a1f348c20157db7bd7c759fdeb23fbe8729c571
|
|
|
|
For some reasones something goes wrong and HAVE_STRNDUP does not get defined on rosa2016.1,
|
|
(no problems on rosa2019.05 and rosa2019.1).
|
|
|
|
The compiler fails:
|
|
../../third_party/wayland/src/src/scanner.c:979:1: error: expected identifier or '('
|
|
strndup(const char *s, size_t size)
|
|
|
|
glibc in rosa2016.1-rosa2019.1 does have strndup, workaround this issue by removing not needed code.
|
|
|
|
// mikhailnov, 09.01.2021
|
|
|
|
diff --git a/src/scanner.c b/src/scanner.c
|
|
index 7ed1ba1a..2b3adbda 100644
|
|
--- a/third_party/wayland/src/src/scanner.c
|
|
+++ b/third_party/wayland/src/src/scanner.c
|
|
@@ -974,17 +916,6 @@
|
|
|
|
}
|
|
|
|
-#ifndef HAVE_STRNDUP
|
|
-char *
|
|
-strndup(const char *s, size_t size)
|
|
-{
|
|
- char *r = malloc(size + 1);
|
|
- strncpy(r, s, size);
|
|
- r[size] = '\0';
|
|
- return r;
|
|
-}
|
|
-#endif
|
|
-
|
|
static void
|
|
end_element(void *data, const XML_Char *name)
|
|
{
|