/[gentoo-alt]/trunk/prefix-overlay/media-libs/libpng/files/libpng-1.2.8-strnlen.patch
Gentoo

Contents of /trunk/prefix-overlay/media-libs/libpng/files/libpng-1.2.8-strnlen.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 900 - (show annotations) (download)
Sun Nov 27 18:50:10 2005 UTC (8 years, 8 months ago) by kito
File size: 580 byte(s)
Initial import.
1 strnlen is a GNU extension
2
3 --- libpng/pngerror.c
4 +++ libpng/pngerror.c
5 @@ -23,6 +23,16 @@
6 png_default_warning PNGARG((png_structp png_ptr,
7 png_const_charp warning_message));
8
9 +#ifndef _GNU_SOURCE
10 +size_t strnlen(const char *s, size_t limit)
11 +{
12 + size_t len = 0;
13 + while ((len < limit) && (*s++))
14 + len++;
15 + return len;
16 +}
17 +#endif
18 +
19 /* This function is called whenever there is a fatal error. This function
20 * should not be changed. If there is a need to handle errors differently,
21 * you should supply a replacement error function and use png_set_error_fn()

  ViewVC Help
Powered by ViewVC 1.1.20