MesaLib: Remove patch for strnlen on old macOS, use USE_FEATURES instead
This commit is contained in:
parent
5f12ce739b
commit
7f13932791
3 changed files with 4 additions and 28 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.173 2019/10/28 13:20:33 nia Exp $
|
||||
# $NetBSD: Makefile,v 1.174 2019/10/29 20:27:39 nia Exp $
|
||||
|
||||
DISTNAME= mesa-19.2.2
|
||||
PKGNAME= ${DISTNAME:S/mesa/MesaLib/}
|
||||
|
@ -15,6 +15,8 @@ USE_TOOLS+= bison flex pkg-config xgettext
|
|||
USE_LANGUAGES= c99 c++
|
||||
USE_LIBTOOL= yes
|
||||
|
||||
USE_FEATURES+= strnlen
|
||||
|
||||
CFLAGS.SunOS+= -D_POSIX_PTHREAD_SEMANTICS
|
||||
CXXFLAGS.SunOS+= -Drestrict=__restrict__
|
||||
LDFLAGS.SunOS+= -lsocket -lnsl
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.139 2019/10/29 20:20:04 nia Exp $
|
||||
$NetBSD: distinfo,v 1.140 2019/10/29 20:27:39 nia Exp $
|
||||
|
||||
SHA1 (mesa-19.2.2.tar.xz) = 6ddc41e71d894dd406a3ca482f1cfda44566a5f8
|
||||
RMD160 (mesa-19.2.2.tar.xz) = 10a5761ecb3f9dc1157ad2516abb48cc91e9d4e1
|
||||
|
@ -38,7 +38,6 @@ SHA1 (patch-src_mesa_main_macros.h) = c5dceaa8dc02a58e5b2273d82e3fe1cc12e327d3
|
|||
SHA1 (patch-src_mesa_main_shader__query.cpp) = 3f9c31645d87855759def11344dee16af23c7be3
|
||||
SHA1 (patch-src_mesa_x86_common__x86.c) = f8c4b93443ef66d017f6aa114b877565b30f2598
|
||||
SHA1 (patch-src_util_build__id.c) = 7a9547bbda9d2fb9f0018ccf27b70b59e497aa2c
|
||||
SHA1 (patch-src_util_ralloc.c) = d311bfd9ed7e673d72e050668d351c1e6552cdc8
|
||||
SHA1 (patch-src_util_strndup.h) = 73f49694ca48ad6b9a9d8346c5b84fddec2463bd
|
||||
SHA1 (patch-src_util_u__atomic.h) = 31d4514538ef5ee53012695eb5c66134aaec981e
|
||||
SHA1 (patch-src_util_u__queue.c) = ed1ea3f6fc37e9a64894a3e865c48691b6e01b2c
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
$NetBSD: patch-src_util_ralloc.c,v 1.1 2019/08/21 13:35:28 nia Exp $
|
||||
|
||||
FreeBSD reported atexit bug for 10.6:
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=91869
|
||||
|
||||
* Fix exit time segfault of qt5 application with modular xorg
|
||||
* Provide compat strnlen for older Darwin.
|
||||
|
||||
--- src/util/ralloc.c.orig 2017-05-10 14:13:58.000000000 +0000
|
||||
+++ src/util/ralloc.c
|
||||
@@ -368,7 +368,14 @@ ralloc_strndup(const void *ctx, const ch
|
||||
if (unlikely(str == NULL))
|
||||
return NULL;
|
||||
|
||||
+#if (defined(__APPLE__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 < 1070)
|
||||
+ for (n = 0; n < max; n++, str++) {
|
||||
+ if (!*str)
|
||||
+ break;
|
||||
+ }
|
||||
+#else
|
||||
n = strnlen(str, max);
|
||||
+#endif
|
||||
ptr = ralloc_array(ctx, char, n + 1);
|
||||
memcpy(ptr, str, n);
|
||||
ptr[n] = '\0';
|
Loading…
Reference in a new issue