1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00
freebsd-ports/audio/ripperx/files/patch-plugins-ripperX_plugin-oggenc.c
Martin Wilke 4a3e13ee72 RipperX is a GTK program to rip CD audio tracks and encode them
to the Ogg, MP3, or FLAC formats.  It is easy, requiring a few mouse
clicks to convert an entire album, displaying progress along the
way.  It can rip and encode in parallel, and supports CDD.

WWW:	http://sourceforge.net/projects/ripperx/

PR:		ports/107493
Submitted by:	trasz <trasz at pin.if.uz.zgora.pl>
2007-01-05 22:18:30 +00:00

31 lines
575 B
C

--- plugins/ripperX_plugin-oggenc.c.orig Wed Jan 3 20:15:49 2007
+++ plugins/ripperX_plugin-oggenc.c Wed Jan 3 20:22:39 2007
@@ -1,5 +1,3 @@
-// strndup is a GNU extension:
-#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -8,6 +6,21 @@
#define OGG_OUTPUT_BUF_LENGTH 2048
#define PRINTOUT_INTERVAL 0.5
+
+char
+*strndup(const char *string, size_t n)
+{
+ char *ret = malloc(n + 1);
+
+ if (ret == NULL)
+ return NULL;
+
+ strncpy(ret, string, n);
+
+ ret[n] = '\0';
+
+ return ret;
+}
void
strip_shit(char* input, int len) {