pkgsrc/graphics/MesaLib18/patches/patch-src_util_strndup.h
ryoon 20ddd43af8 graphics/MesaLib18: import MesaLib-18.2.0 from wip/MesaLib
MesaLib is a 3-D graphics library with an API which is very similar to
that of OpenGL*.  To the extent that Mesa utilizes the OpenGL command syntax
or state machine, it is being used with authorization from Silicon Graphics,
Inc.  However, the author makes no claim that Mesa is in any way a
compatible replacement for OpenGL or associated with Silicon Graphics, Inc.
2018-10-07 23:49:31 +00:00

15 lines
438 B
C

$NetBSD: patch-src_util_strndup.h,v 1.1 2018/10/07 23:49:31 ryoon Exp $
Provide compat strndup for older Darwin.
--- src/util/strndup.h.orig 2017-05-10 14:13:58.000000000 +0000
+++ src/util/strndup.h
@@ -24,7 +24,7 @@
#ifndef STRNDUP_H
#define STRNDUP_H
-#if defined(_WIN32)
+#if defined(_WIN32) || (defined(__APPLE__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 < 1070)
#include <stdlib.h> // size_t
#include <string.h>