ports/textproc/libextractor/files/patch-src_plugins_pngextractor.c
Jeremy Messenger 0e27427f9a - USE_LIBLTDL and GNU_CONFIGURE -> USE_AUTOTOOLS=libtool:15 libltdl
- Add CONFIGURE_ENV stuff or it will not working if it's install in
  the different prefix.
- Do not extract libltdl to ensure that it will using system one.
- Kill, kill, kill the ^M.
- Respect more on ${PTHREAD_LIBS} (ie: kill the hardcore of -lc_r)
- Add autocheck on ImageMagick and libvorbis, which its configure
  will doing the autochecks then enable the plugins by automatic.
  It fixes the plist and dependency.
- Add strnlen() function, a non-standard, that is not exist in
  FreeBSD libc, which is need for the libextractor_png.so. Without
  it, evidence will complaining like this:

  /libexec/ld-elf.so.1: /usr/local/lib/libextractor/libextractor_png.so:
  Undefined symbol "strnlen"
- Bump the PORTREVISION.

Reported by:	tmclaugh (strnlen function stuff)
Reviewed by:	jylefort
Approved by:	kevlo (maintainer)
2005-10-06 06:14:36 +00:00

16 lines
417 B
C

--- src/plugins/pngextractor.c.orig Tue Oct 4 22:36:11 2005
+++ src/plugins/pngextractor.c Tue Oct 4 22:36:40 2005
@@ -23,6 +23,13 @@
#include <zlib.h>
#include "convert.h"
+size_t
+strnlen (const char *string, size_t maxlen)
+{
+ const char *end = memchr (string, '\0', maxlen);
+ return end ? (size_t) (end - string) : maxlen;
+}
+
static char * stndup(const char * str,
size_t n) {
char * tmp;