pkgsrc/textproc/subtitleripper/patches/patch-ac

30 lines
919 B
Text

$NetBSD: patch-ac,v 1.1 2010/01/09 12:25:20 obache Exp $
Add patch-ac to avoid conflict with getline(3) defined in IEEE Std 1003.1-2008.
--- vobsub.c.orig 2003-12-08 09:28:02.000000000 +0000
+++ vobsub.c
@@ -51,12 +51,12 @@ extern int vobsub_id;
extern int verbose;
#ifdef HAVE_GETLINE
-extern ssize_t getline(char **, size_t *, FILE *);
+extern ssize_t get_line(char **, size_t *, FILE *);
#else
/* FIXME This should go into a general purpose library or even a
separate file. */
static ssize_t
-getline (char **lineptr, size_t *n, FILE *stream)
+get_line (char **lineptr, size_t *n, FILE *stream)
{
size_t res = 0;
int c;
@@ -753,7 +753,7 @@ vobsub_parse_one_line(vobsub_t *vob, FIL
do {
size_t line_reserve = 0;
char *line = NULL;
- line_size = getline(&line, &line_reserve, fd);
+ line_size = get_line(&line, &line_reserve, fd);
if (line_size < 0) {
if (line)
free(line);