--- calendar/calfile.C
+++ calendar/calfile.C
@@ -58,7 +58,7 @@
     backupName = tmp;
 
     // Get directory name for access checks
-    char* lastSlash = strrchr(name, '/');
+    const char* lastSlash = strrchr(name, '/');
     if (lastSlash == 0) {
         /* Calendar is in current directory */
         tmp = new char[3];