]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#8695 - Update Windows to use Sleep instead of deprecated _sleep
authorQuanah Gibson-Mount <quanah@openldap.org>
Tue, 15 Jun 2021 18:20:27 +0000 (18:20 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Sun, 27 Jun 2021 19:03:30 +0000 (19:03 +0000)
include/ac/unistd.h

index cb5fe65aad1a6afb2901eb518f96eeb1f5f337f5..7f14115f62cb9c992ebd05a7b05899bea650b2c8 100644 (file)
@@ -61,12 +61,12 @@ LDAP_LUTIL_F(char*)(lutil_getpass) LDAP_P((const char *getpass));
 /*
  * Windows: although sleep() will be resolved by both MSVC and Mingw GCC
  * linkers, the function is not declared in header files. This is
- * because Windows' version of the function is called _sleep(), and it
- * is declared in stdlib.h
+ * because Windows' version of the function is called Sleep(), and it
+ * is declared in windows.h
  */
 
 #ifdef _WIN32
-#define sleep _sleep
+#define sleep(x)       Sleep((x) * 1000)
 #endif
 
 #endif /* _AC_UNISTD_H */