diff -up asymptote-2.52/prc/PRCdouble.cc.const-memrchr asymptote-2.52/prc/PRCdouble.cc
--- asymptote-2.52/prc/PRCdouble.cc.const-memrchr	2019-08-14 11:17:29.996063195 -0400
+++ asymptote-2.52/prc/PRCdouble.cc	2019-08-14 11:18:02.232408054 -0400
@@ -24,7 +24,7 @@ int stCOFDOECompare(const void* pcofdoe1
 
 #ifdef WORDS_BIGENDIAN
 #ifndef HAVE_MEMRCHR
-void *memrchr(const void *buf,int c,size_t count)
+const void *memrchr(const void *buf,int c,size_t count)
 {
   unsigned char
       *pcBuffer=(unsigned char *)buf,
diff -up asymptote-2.52/prc/PRCdouble.h.const-memrchr asymptote-2.52/prc/PRCdouble.h
--- asymptote-2.52/prc/PRCdouble.h.const-memrchr	2019-08-09 04:24:30.000000000 -0400
+++ asymptote-2.52/prc/PRCdouble.h	2019-08-10 07:28:58.363622539 -0400
@@ -133,7 +133,7 @@ int stCOFDOECompare(const void*,const vo
 
 #ifdef WORDS_BIGENDIAN
 #ifndef HAVE_MEMRCHR
-void *memrchr(const void *,int,size_t);
+const void *memrchr(const void *,int,size_t);
 #endif
 #endif
 
