diff options
Diffstat (limited to 'src/pacman/util.c')
-rw-r--r-- | src/pacman/util.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c index 1fb6ead9..a7259e25 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -21,10 +21,6 @@ #include "config.h" -#if defined(__APPLE__) || defined(__OpenBSD__) -#include <sys/syslimits.h> -#include <sys/stat.h> -#endif #include <sys/types.h> #include <sys/ioctl.h> #include <sys/time.h> @@ -37,9 +33,6 @@ #include <ctype.h> #include <dirent.h> #include <unistd.h> -#ifdef CYGWIN -#include <limits.h> /* PATH_MAX */ -#endif #include <alpm.h> #include <alpm_list.h> @@ -88,7 +81,7 @@ int getcols() int makepath(char *path) { char *orig, *str, *ptr; - char full[PATH_MAX] = ""; + char full[PATH_MAX+1] = ""; mode_t oldmask; oldmask = umask(0000); @@ -99,6 +92,7 @@ int makepath(char *path) if(strlen(ptr)) { struct stat buf; + /* TODO we should use strncat */ strcat(full, "/"); strcat(full, ptr); if(stat(full, &buf)) { |