mirror of
https://github.com/eclipse/upm.git
synced 2025-03-14 20:47:30 +03:00
upm_utilities: Add a _POSIX_C_SOURCE define if needed
In certain systems, where -std=c11 is used, certain posix extensions are disabled unless specifically enabled. On these systems, this could cause usleep() and/or nanosleep() to fail with an implicit declaration warning. This patch ensures that at least POSIX 200809 is used, if otherwise undefined. This should fix Issue #513. Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
parent
90d856d128
commit
fb88fda5cb
@ -23,6 +23,10 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _POSIX_C_SOURCE
|
||||
// We need at least 199309L for nanosleep()
|
||||
# define _POSIX_C_SOURCE 200809L
|
||||
#endif
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <upm_platform.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user