projects
/
finddup.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added the include of sys/param.h to compile on FreeBSD.
[finddup.git]
/
finddup.c
diff --git
a/finddup.c
b/finddup.c
index
983168b
..
e36c229
100644
(file)
--- a/
finddup.c
+++ b/
finddup.c
@@
-29,6
+29,7
@@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/param.h>
#include <dirent.h>
#include <stdlib.h>
#include <stdio.h>
#include <dirent.h>
#include <stdlib.h>
#include <stdio.h>
@@
-196,7
+197,7
@@
struct file_with_size *scan_directory(struct file_with_size *tail,
struct dirent *dir_e;
struct stat sb;
struct file_with_size *tmp;
struct dirent *dir_e;
struct stat sb;
struct file_with_size *tmp;
- char subname[PATH_MAX];
+ char subname[PATH_MAX
+ 1
];
if(lstat(name, &sb) != 0) {
fprintf(stderr, "Can not stat \"%s\": %s\n", name, strerror(errno));
if(lstat(name, &sb) != 0) {
fprintf(stderr, "Can not stat \"%s\": %s\n", name, strerror(errno));
@@
-233,7
+234,7
@@
struct file_with_size *scan_directory(struct file_with_size *tail,
}
void print_file(struct file_with_size *node) {
}
void print_file(struct file_with_size *node) {
- char tmp[PATH_MAX];
+ char tmp[PATH_MAX
+ 1
];
if(show_realpaths) {
if(show_groups) {
realpath(node->filename, tmp);
if(show_realpaths) {
if(show_groups) {
realpath(node->filename, tmp);