diff -ur src/lib/base64.c.orig src/lib/base64.c
--- src/lib/base64.c.orig	2010-01-25 08:56:28.000000000 +0100
+++ src/lib/base64.c	2010-02-17 17:53:48.000000000 +0100
@@ -74,9 +74,9 @@
  * stored (not including the EOS).
  */
 int
-to_base64(intmax_t value, char *where)
+to_base64(int64_t value, char *where)
 {
-   uintmax_t val;
+   uint64_t val;
    int i = 0;
    int n;
 
@@ -98,7 +98,7 @@
    val = value;
    where[i] = 0;
    do {
-      where[--i] = base64_digits[val & (uintmax_t)0x3F];
+      where[--i] = base64_digits[val & (uint64_t)0x3F];
       val >>= 6;
    } while (val);
    return n;
@@ -112,9 +112,9 @@
  * Returns the value.
  */
 int
-from_base64(intmax_t *value, char *where)
+from_base64(int64_t *value, char *where)
 {
-   uintmax_t val = 0;
+   uint64_t val = 0;
    int i, neg;
 
    if (!base64_inited)
@@ -131,7 +131,7 @@
       val += base64_map[(uint8_t)where[i++]];
    }
 
-   *value = neg ? -(intmax_t)val : (intmax_t)val;
+   *value = neg ? -(int64_t)val : (int64_t)val;
    return i;
 }
 
diff -ur src/lib/protos.h.orig src/lib/protos.h
--- src/lib/protos.h.orig	2010-01-25 08:56:28.000000000 +0100
+++ src/lib/protos.h	2010-02-17 17:54:49.000000000 +0100
@@ -45,8 +45,8 @@
 
 /* base64.c */
 void      base64_init            (void);
-int       to_base64              (intmax_t value, char *where);
-int       from_base64            (intmax_t *value, char *where);
+int       to_base64              (int64_t value, char *where);
+int       from_base64            (int64_t *value, char *where);
 int       bin_to_base64          (char *buf, int buflen, char *bin, int binlen, 
                                   int compatible);
 
diff -ur src/filed/restore.c.orig src/files/restore.c
--- src/filed/restore.c.orig	2010-01-25 08:56:28.000000000 +0100
+++ src/filed/restore.c	2010-02-17 17:43:47.000000000 +0100
@@ -155,7 +155,7 @@
    char ec1[50];                      /* Buffer printing huge values */
    uint32_t buf_size;                 /* client buffer size */
    int stat;
-   intmax_t rsrc_len = 0;             /* Original length of resource fork */
+   int64_t rsrc_len = 0;             /* Original length of resource fork */
    r_ctx rctx;
    ATTR *attr;
    /* ***FIXME*** make configurable */
@@ -608,7 +608,7 @@
                      continue;
                   }
 
-                  rctx.fork_size = rsrc_len;
+                  rctx.fork_size = (intmax_t)rsrc_len;
                   Dmsg0(130, "Restoring resource fork\n");
                }
 

