summaryrefslogtreecommitdiff
path: root/audio/mp3blaster/patches/patch-ag
blob: 948c56e17d59e2d3d9369167ab20a735f0612ab5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$NetBSD: patch-ag,v 1.4 2005/12/11 22:22:37 joerg Exp $

--- src/main.cc.orig	2003-09-09 21:22:55.000000000 +0000
+++ src/main.cc
@@ -51,10 +51,10 @@
 #include <pth.h>
 #endif
 #include NCURSES
-#ifdef HAVE_GETOPT_H
+#ifdef HAVE_GETOPT_LONG_ONLY
 #include <getopt.h>
 #else
-#include "getopt.h"
+#include "../getopt/getopt.h"
 #endif
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
@@ -2917,7 +2917,7 @@ recsel_files(const char *path, char ***f
 	while ( (entry = readdir(dir)) )
 	{
 		DIR *dir2 = NULL;
-		char *newpath = (char *)malloc((entry->d_reclen + 2 + strlen(path)) *
+		char *newpath = (char *)malloc((sizeof(*entry) + entry->d_namlen + 2 + strlen(path)) *
 			sizeof(char));
 
 		PTH_YIELD;