diff options
author | pav <pav@FreeBSD.org> | 2011-03-11 20:51:56 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2011-03-11 20:51:56 +0800 |
commit | c80a06400ce30ca215c6243551fa6133854bc4fd (patch) | |
tree | 058e34f80851b33284bf2a6a71c53ba5615e583a /multimedia | |
parent | 791d91ef93a6c51983c9e7058acf61204c855313 (diff) | |
download | freebsd-ports-gnome-c80a06400ce30ca215c6243551fa6133854bc4fd.tar.gz freebsd-ports-gnome-c80a06400ce30ca215c6243551fa6133854bc4fd.tar.zst freebsd-ports-gnome-c80a06400ce30ca215c6243551fa6133854bc4fd.zip |
- Fix build on 7.X
Submitted by: maintainer
Diffstat (limited to 'multimedia')
-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) + { |