Index: functions.c
===================================================================
--- functions.c	(revision fea7992f0a3e4aef271ffbef3db193cff34a923d)
+++ functions.c	(revision 712caac5659285580c2d4e676ebf61794d84704d)
@@ -3126,5 +3126,5 @@
         for (i=0; i<j; i++) {
           user=owl_list_get_element(&anyone, i);
-          ret=ZLocateUser(user, &numlocs, ZAUTH);
+          ret=ZLocateUser(zstr(user), &numlocs, ZAUTH);
 
           owl_function_mask_sigint(NULL);
@@ -3480,5 +3480,5 @@
   for (i=0; i<j; i++) {
     user=owl_list_get_element(&anyone, i);
-    ret=ZLocateUser(user, &numlocs, ZAUTH);
+    ret=ZLocateUser(zstr(user), &numlocs, ZAUTH);
     if (ret!=ZERR_NONE) {
       owl_function_error("Error getting location for %s", user);
Index: owl.h
===================================================================
--- owl.h	(revision 41c9a9675faf455c3c6adfbc629faf55ddbfe10f)
+++ owl.h	(revision 712caac5659285580c2d4e676ebf61794d84704d)
@@ -193,4 +193,12 @@
 
 #define LINE 2048
+
+#ifdef HAVE_LIBZEPHYR
+/* libzephyr doesn't use const, so we appease the type system with this cast. */
+static inline char *zstr(const char *str)
+{
+  return (char *)str;
+}
+#endif
 
 typedef struct _owl_variable {
Index: perlconfig.c
===================================================================
--- perlconfig.c	(revision f12d199d397b94c7a171e1a21cc0a43392faa98a)
+++ perlconfig.c	(revision 712caac5659285580c2d4e676ebf61794d84704d)
@@ -179,11 +179,11 @@
     n->z_auth = ZAUTH_NO;
     n->z_checked_auth = 0;
-    n->z_class = owl_message_get_class(m);
-    n->z_class_inst = owl_message_get_instance(m);
-    n->z_opcode = owl_message_get_opcode(m);
-    n->z_sender = owl_message_get_sender(m);
-    n->z_recipient = owl_message_get_recipient(m);
-    n->z_default_format = "[zephyr created from perl]";
-    n->z_multinotice = "[zephyr created from perl]";
+    n->z_class = zstr(owl_message_get_class(m));
+    n->z_class_inst = zstr(owl_message_get_instance(m));
+    n->z_opcode = zstr(owl_message_get_opcode(m));
+    n->z_sender = zstr(owl_message_get_sender(m));
+    n->z_recipient = zstr(owl_message_get_recipient(m));
+    n->z_default_format = zstr("[zephyr created from perl]");
+    n->z_multinotice = zstr("[zephyr created from perl]");
     n->z_num_other_fields = 0;
     n->z_message = owl_sprintf("%s%c%s", owl_message_get_zsig(m), '\0', owl_message_get_body(m));
Index: zephyr.c
===================================================================
--- zephyr.c	(revision fea7992f0a3e4aef271ffbef3db193cff34a923d)
+++ zephyr.c	(revision 712caac5659285580c2d4e676ebf61794d84704d)
@@ -54,10 +54,10 @@
   req.z_kind = STAT;
   req.z_port = 0;
-  req.z_class = HM_STAT_CLASS;
-  req.z_class_inst = HM_STAT_CLIENT;
-  req.z_opcode = HM_GIMMESTATS;
-  req.z_sender = "";
-  req.z_recipient = "";
-  req.z_default_format = "";
+  req.z_class = zstr(HM_STAT_CLASS);
+  req.z_class_inst = zstr(HM_STAT_CLIENT);
+  req.z_opcode = zstr(HM_GIMMESTATS);
+  req.z_sender = zstr("");
+  req.z_recipient = zstr("");
+  req.z_default_format = zstr("");
   req.z_message_len = 0;
 
@@ -427,7 +427,7 @@
   ZSubscription_t subs[5];
 
-  subs[0].zsub_class=class;
-  subs[0].zsub_classinst=inst;
-  subs[0].zsub_recipient=recip;
+  subs[0].zsub_class=zstr(class);
+  subs[0].zsub_classinst=zstr(inst);
+  subs[0].zsub_recipient=zstr(recip);
 
   ZResetAuthentication();
@@ -448,7 +448,7 @@
   ZSubscription_t subs[5];
 
-  subs[0].zsub_class=class;
-  subs[0].zsub_classinst=inst;
-  subs[0].zsub_recipient=recip;
+  subs[0].zsub_class=zstr(class);
+  subs[0].zsub_classinst=zstr(inst);
+  subs[0].zsub_recipient=zstr(recip);
 
   ZResetAuthentication();
@@ -676,16 +676,16 @@
   notice.z_kind=ACKED;
   notice.z_port=0;
-  notice.z_class=class;
-  notice.z_class_inst=instance;
+  notice.z_class=zstr(class);
+  notice.z_class_inst=zstr(instance);
   notice.z_sender=NULL;
   if (!strcmp(recipient, "*") || !strcmp(recipient, "@")) {
-    notice.z_recipient="";
+    notice.z_recipient=zstr("");
     if (*owl_global_get_zsender(&g))
-        notice.z_sender=owl_global_get_zsender(&g);
+        notice.z_sender=zstr(owl_global_get_zsender(&g));
   } else {
-    notice.z_recipient=recipient;
-  }
-  notice.z_default_format="Class $class, Instance $instance:\nTo: @bold($recipient) at $time $date\nFrom: @bold{$1 <$sender>}\n\n$2";
-  if (opcode) notice.z_opcode=opcode;
+    notice.z_recipient=zstr(recipient);
+  }
+  notice.z_default_format=zstr("Class $class, Instance $instance:\nTo: @bold($recipient) at $time $date\nFrom: @bold{$1 <$sender>}\n\n$2");
+  if (opcode) notice.z_opcode=zstr(opcode);
 
   notice.z_message_len=strlen(zsig)+1+strlen(message);
@@ -895,5 +895,5 @@
   strcpy(out, "");
   ZResetAuthentication();
-  ret=ZLocateUser(user,&numlocs,auth?ZAUTH:ZNOAUTH);
+  ret=ZLocateUser(zstr(user),&numlocs,auth?ZAUTH:ZNOAUTH);
   if (ret != ZERR_NONE) {
     sprintf(out, "Error locating user %s\n", user);
@@ -1004,5 +1004,5 @@
     
   eset=EXPOSE_REALMVIS;
-  exposure=ZGetVariable("exposure");
+  exposure=ZGetVariable(zstr("exposure"));
   if (exposure==NULL) {
     eset=EXPOSE_REALMVIS;
@@ -1021,5 +1021,5 @@
   }
    
-  ret=ZSetLocation(eset);
+  ret=ZSetLocation(zstr(eset));
   if (ret != ZERR_NONE) {
     /*
@@ -1159,5 +1159,5 @@
 {
 #ifdef HAVE_LIBZEPHYR
-  return(ZGetVariable(var));
+  return(ZGetVariable(zstr(var)));
 #else
   return("");
@@ -1168,5 +1168,5 @@
 {
 #ifdef HAVE_LIBZEPHYR
-  ZInitLocationInfo(host, val);
+  ZInitLocationInfo(zstr(host), zstr(val));
 #endif
 }
