From e33f207c2e465b6211873ce24fb1a1959317e63a Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Mon, 16 Sep 2013 21:47:27 +0200 Subject: junklib: get rid of strnlen to fix osx 10.6 compile issue --- junklib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'junklib.c') diff --git a/junklib.c b/junklib.c index 04b29628..03a0f99c 100644 --- a/junklib.c +++ b/junklib.c @@ -2925,7 +2925,11 @@ junk_load_comm_frame (int version_major, playItem_t *it, uint8_t *readptr, int s * or "album". Also only supports peak value if stored as 16 bits. */ static int junk_id3v2_load_rva2 (int version_major, playItem_t *it, uint8_t *readptr, int synched_size) { char *rva_desc = readptr; - unsigned rva_desc_len = strnlen(rva_desc, synched_size); + unsigned rva_desc_len = 0; + const char *p = rva_desc; + while (*p++ && rva_desc_len < synched_size) { + rva_desc_len++; + } if(rva_desc_len == synched_size) { /* tag too short */ return -1; -- cgit v1.2.3