diff --git a/src/dir.h b/src/dir.h
index 94899ab406ab9379a7cb164698450c08633d394a..e9d42f9bdfdb56cc0e2312011bd1908895f3d118 100644
--- a/src/dir.h
+++ b/src/dir.h
@@ -80,7 +80,7 @@ struct dir_output {
   /* The output code is responsible for updating these stats. Can be 0 when not
    * available. */
   int64_t size;
-  long items;
+  int items;
 };
 
 
diff --git a/src/dir_common.c b/src/dir_common.c
index b0080cddf83bbf4a724852b465d720de3cdec68a..f13e6670b52526a3d3dc8b7339b81490bb9d4620 100644
--- a/src/dir_common.c
+++ b/src/dir_common.c
@@ -182,7 +182,7 @@ void dir_draw() {
     if(dir_fatalerr)
       fprintf(stderr, "\r%s.\n", dir_fatalerr);
     else
-      fprintf(stderr, "\r%-55s %8ld files /%s",
+      fprintf(stderr, "\r%-55s %8d files /%s",
         cropstr(dir_curpath, 55), dir_output.items, formatsize(dir_output.size));
     break;
   case 2:
diff --git a/src/global.h b/src/global.h
index e244d27678c960dcca060dc12ca75dd42d383f33..e1f273e305573a623d8d48ebe9eb61920058b7a4 100644
--- a/src/global.h
+++ b/src/global.h
@@ -62,7 +62,7 @@ struct dir {
   struct dir *parent, *next, *prev, *sub, *hlnk;
   int64_t size, asize;
   ino_t ino;
-  long items;
+  int items;
   dev_t dev;
   unsigned char flags;
   char name[3]; /* must be large enough to hold ".." */
diff --git a/src/util.c b/src/util.c
index f78bddd42f2d1887fbbfab9e4cac007c085f93ca..0cd7fb194812510825b40216b133e4793065d015 100644
--- a/src/util.c
+++ b/src/util.c
@@ -283,7 +283,7 @@ struct dir *getroot(struct dir *d) {
 }
 
 
-void addparentstats(struct dir *d, int64_t size, int64_t asize, long items) {
+void addparentstats(struct dir *d, int64_t size, int64_t asize, int items) {
   while(d) {
     d->size += size;
     d->asize += asize;
diff --git a/src/util.h b/src/util.h
index a8dd11675b4402b92b3b1c9e42cd8141fb1e8367..ac6b46782b2513581540d194a2d45a1948066bc8 100644
--- a/src/util.h
+++ b/src/util.h
@@ -82,7 +82,7 @@ char *getpath(struct dir *);
 struct dir *getroot(struct dir *);
 
 /* Adds a value to the size, asize and items fields of *d and its parents */
-void addparentstats(struct dir *, int64_t, int64_t, long);
+void addparentstats(struct dir *, int64_t, int64_t, int);
 
 #endif