Merge pull request #9810 from SuperIlu/development

Fix compilation on MS-DOS DJGPP
This commit is contained in:
Janos Follath 2024-12-03 09:12:18 +00:00 committed by GitHub
commit f4f37eced7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -0,0 +1,2 @@
Bugfix
* Fix compilation on MS-DOS DJGPP. Fixes #9813.

View File

@ -524,8 +524,8 @@ void mbedtls_net_usleep(unsigned long usec)
#else
struct timeval tv;
tv.tv_sec = usec / 1000000;
#if defined(__unix__) || defined(__unix) || \
(defined(__APPLE__) && defined(__MACH__))
#if (defined(__unix__) || defined(__unix) || \
(defined(__APPLE__) && defined(__MACH__))) && !defined(__DJGPP__)
tv.tv_usec = (suseconds_t) usec % 1000000;
#else
tv.tv_usec = usec % 1000000;