-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass c99 to compiler #3641
Pass c99 to compiler #3641
Changes from all commits
df865c3
f5f1cfc
faef649
85fba90
c9c6e8d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -18,6 +18,15 @@ | |||||||
* | ||||||||
* This file is part of mbed TLS (https://tls.mbed.org) | ||||||||
*/ | ||||||||
#ifndef _BSD_SOURCE | ||||||||
/* Required to get htole64() from gcc/glibc's endian.h (older systems) | ||||||||
* when we compile with -std=c99 */ | ||||||||
#define _BSD_SOURCE | ||||||||
#endif | ||||||||
#ifndef _DEFAULT_SOURCE | ||||||||
/* (modern version of _BSD_SOURCE) */ | ||||||||
#define _DEFAULT_SOURCE | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See https://stackoverflow.com/a/29201732/7761803 (not clear that |
||||||||
#endif | ||||||||
|
||||||||
#include "common.h" | ||||||||
|
||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,9 +73,10 @@ int main( void ) | |
#endif | ||
#endif /* _MSC_VER */ | ||
#else /* ( _WIN32 || _WIN32_WCE ) && !EFIX64 && !EFI32 */ | ||
#if defined(MBEDTLS_HAVE_TIME) | ||
#if defined(MBEDTLS_HAVE_TIME) || (defined(MBEDTLS_TIMING_C) && !defined(MBEDTLS_TIMING_ALT)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @AndrzejKurek LOL :) (@daverodgman don't worry, just flash-backs to a previous PR!) |
||
#include <sys/time.h> | ||
#endif | ||
#include <sys/select.h> | ||
#include <sys/types.h> | ||
#include <unistd.h> | ||
#endif /* ( _WIN32 || _WIN32_WCE ) && !EFIX64 && !EFI32 */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For unusual things like this it is useful to have a comment that explains why they are needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err, yes, but why? what happens if you don't have it?