- Fix build on 7.X

Submitted by:	maintainer
This commit is contained in:
Pav Lucistnik 2011-03-11 12:51:56 +00:00
parent c97fe5c631
commit 88fce9020b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=270671
2 changed files with 25 additions and 0 deletions

View File

@ -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

View File

@ -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)
{