diff --git a/bsd/porting/synch.cc b/bsd/porting/synch.cc
index 489ed822600668b36dfd6adad26653283a0dfef3..fb3a46ad671d575b68040631e5d127490513320d 100644
--- a/bsd/porting/synch.cc
+++ b/bsd/porting/synch.cc
@@ -42,7 +42,7 @@ public:
         return (_instance);
     }
 
-    int msleep(void *chan, struct mtx *mtx, int priority, const char *wmesg,
+    int _msleep(void *chan, struct mtx *mtx, int priority, const char *wmesg,
          int timo);
 
     void wakeup(void* chan);
@@ -60,7 +60,7 @@ private:
 
 synch_port* synch_port::_instance = nullptr;
 
-int synch_port::msleep(void *chan, struct mtx *mtx,
+int synch_port::_msleep(void *chan, struct mtx *mtx,
     int priority, const char *wmesg, int timo_hz)
 {
     trace_synch_msleep(chan, mtx, timo_hz);
@@ -170,20 +170,20 @@ void synch_port::wakeup_one(void* chan)
     mutex_unlock(&_lock);
 }
 
-extern "C" int msleep(void *chan, struct mtx *mtx, int priority, const char *wmesg,
+extern "C" int _msleep(void *chan, struct mtx *mtx, int priority, const char *wmesg,
      int timo)
 {
-    return (synch_port::instance()->msleep(chan, mtx, priority, wmesg, timo));
+    return (synch_port::instance()->_msleep(chan, mtx, priority, wmesg, timo));
 }
 
 extern "C" int tsleep(void *chan, int priority, const char *wmesg, int timo)
 {
-    return (msleep(chan, 0, priority, wmesg, timo));
+    return (_msleep(chan, 0, priority, wmesg, timo));
 }
 
 extern "C" void bsd_pause(const char *wmesg, int timo)
 {
-    msleep(0, 0, 0, wmesg, timo);
+    _msleep(0, 0, 0, wmesg, timo);
 }
 
 extern "C" void wakeup(void* chan)
diff --git a/bsd/porting/synch.h b/bsd/porting/synch.h
index 7a106f1bed4f95db478f06a7299cda5bd56b1aff..06a1134169b203870808e24da3b139d871e75f58 100644
--- a/bsd/porting/synch.h
+++ b/bsd/porting/synch.h
@@ -15,9 +15,10 @@
 /* See the FreeBSD sleep(9) manual entry for usage */
 
 __BEGIN_DECLS
-int msleep(void *chan, struct mtx *mtx, int priority, const char *wmesg,
+int _msleep(void *chan, struct mtx *mtx, int priority, const char *wmesg,
      int timo);
 
+#define msleep(_c, _m, _p, _w, _t) _msleep((_c), (struct mtx *)(_m), (_p), (_w), (_t))
 int tsleep(void *chan, int priority, const char *wmesg, int timo);
 
 void bsd_pause(const char *wmesg, int timo);