$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 #endif #include NCURSES -#ifdef HAVE_GETOPT_H +#ifdef HAVE_GETOPT_LONG_ONLY #include #else -#include "getopt.h" +#include "../getopt/getopt.h" #endif #ifdef HAVE_ERRNO_H #include @@ -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;