]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/unix.c
Use uint64_t instead of off_t for VolSpace
[netatalk.git] / etc / afpd / unix.c
index 9eafa7e0f6bb1150196cba3b3ea6a69778f1a85d..8d60a6ef61cca4a547e0ffe6bdfc1e9e6f534c7b 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <inttypes.h>
 
 /* STDC check */
 #ifdef STDC_HEADERS
@@ -52,7 +53,7 @@ char *strchr (), *strrchr ();
  */
 int ustatfs_getvolspace(const struct vol *vol, VolSpace *bfree, VolSpace *btotal, u_int32_t *bsize)
 {
-    VolSpace maxVolSpace = INTMAX_MAX;
+    VolSpace maxVolSpace = UINT64_MAX;
 
 #ifdef ultrix
     struct fs_data     sfs;
@@ -60,7 +61,6 @@ int ustatfs_getvolspace(const struct vol *vol, VolSpace *bfree, VolSpace *btotal
     struct statfs      sfs;
 #endif /*ultrix*/
 
-
     if ( statfs( vol->v_path, &sfs ) < 0 ) {
         LOG(log_error, logtype_afpd, "ustatfs_getvolspace unable to stat %s", vol->v_path);
         return( AFPERR_PARAM );