diff --git a/mail/cyrus-imapd34/files/patch-lib_assert.h b/mail/cyrus-imapd34/files/patch-lib_assert.h
index 28e06f17a2e7..d9c711874f25 100644
--- a/mail/cyrus-imapd34/files/patch-lib_assert.h
+++ b/mail/cyrus-imapd34/files/patch-lib_assert.h
@@ -1,9 +1,11 @@
---- lib/assert.h.orig	2017-09-02 01:09:05 UTC
-+++ lib/assert.h
-@@ -43,6 +43,10 @@
+--- lib/assert.h.orig	2022-01-24 00:38:00.000000000 +0100
++++ lib/assert.h	2022-06-06 19:17:34.291433000 +0200
+@@ -43,11 +43,23 @@
  #ifndef INCLUDED_ASSERT_H
  #define INCLUDED_ASSERT_H
  
++#ifndef PERL_POLLUTE
++
 +#ifdef __cplusplus
 +extern "C" {
 +#endif
@@ -11,12 +13,14 @@
  #ifdef __STDC__
  #define assert(ex)      {if (!(ex))assertionfailed(__FILE__, __LINE__, #ex);}
  void assertionfailed(const char *file, int line, const char *expr);
-@@ -50,4 +54,8 @@ void assertionfailed(const char *file, i
+ #else
  #define assert(ex)      {if (!(ex))assertionfailed(__FILE__, __LINE__, (char*)0);}
- #endif
- 
++#endif
++
 +#ifdef __cplusplus
 +}
 +#endif
 +
+ #endif
+ 
  #endif /* INCLUDED_ASSERT_H */