diff options
-rw-r--r-- | multimedia/libva/Makefile | 5 | ||||
-rw-r--r-- | multimedia/libva/files/extra-patch-va-va_trace.c | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/multimedia/libva/Makefile b/multimedia/libva/Makefile index 9a997fb41c1d..50da94f59dbd 100644 --- a/multimedia/libva/Makefile +++ b/multimedia/libva/Makefile @@ -36,6 +36,11 @@ CFLAGS+= -DHAVE_LINUX_INTEGER_TYPES .include <bsd.port.pre.mk> +# add strnlen(3) from head/lib/libc/string/strnlen.c +.if ${OSVERSION} < 800067 +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-va-va_trace.c +.endif + .if !defined(WITH_DEBUG) CFLAGS+= -DNDEBUG .else diff --git a/multimedia/libva/files/extra-patch-va-va_trace.c b/multimedia/libva/files/extra-patch-va-va_trace.c new file mode 100644 index 000000000000..072b905167b3 --- /dev/null +++ b/multimedia/libva/files/extra-patch-va-va_trace.c @@ -0,0 +1,20 @@ +--- va/va_trace.c~ ++++ va/va_trace.c +@@ -140,6 +140,17 @@ VAStatus vaUnlockSurface(VADisplay dpy, + VASurfaceID surface + ); + ++static size_t ++strnlen(const char *s, size_t maxlen) ++{ ++ size_t len; ++ ++ for (len = 0; len < maxlen; len++, s++) { ++ if (!*s) ++ break; ++ } ++ return (len); ++} + + void va_TraceInit(VADisplay dpy) + { |