diff --git a/acconfig.h b/acconfig.h
index 86b6d5531b989d09ba783292648ad646bbd31f92..23d8aa4955df817b89215517df8ebb5bd515c9c9 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -78,9 +78,9 @@
 #	define WIN32_LEAN_AND_MEAN 1
 #endif
 
-#ifndef __NEED_PROTOTYPES
+#ifndef LDAP_NEED_PROTOTYPES
 /* force LDAP_P to always include prototypes */
-#define __NEED_PROTOTYPES 1
+#define LDAP_NEED_PROTOTYPES 1
 #endif
 
 #ifdef HAVE_STDDEF_H
diff --git a/include/portable.h.in b/include/portable.h.in
index c99ba7db1de1a45cd70ef2e22f4ca6fea31ea062..af9a3511e4e8fea1b48e6c79fe3457aabead3dfe 100644
--- a/include/portable.h.in
+++ b/include/portable.h.in
@@ -941,9 +941,9 @@
 #	define WIN32_LEAN_AND_MEAN 1
 #endif
 
-#ifndef __NEED_PROTOTYPES
+#ifndef LDAP_NEED_PROTOTYPES
 /* force LDAP_P to always include prototypes */
-#define __NEED_PROTOTYPES 1
+#define LDAP_NEED_PROTOTYPES 1
 #endif
 
 #ifdef HAVE_STDDEF_H