Skip to content

Commit

Permalink
Globally define _POSIX_C_SOURCE, we should expect those features to b…
Browse files Browse the repository at this point in the history
…e available generally
  • Loading branch information
mikee47 committed May 15, 2024
1 parent 185a4b0 commit a29d463
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 0 additions & 4 deletions Sming/Arch/Host/Components/hostlib/include/hostlib/hostlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@

#pragma once

// Required for sleep(), probably others
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200112L

#ifdef __WIN32
// Prevent early inclusion of winsock.h
#include <winsock2.h>
Expand Down
3 changes: 2 additions & 1 deletion Sming/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ CPPFLAGS = \
-Wl,-EL \
-finline-functions \
-fdata-sections \
-ffunction-sections
-ffunction-sections \
-D_POSIX_C_SOURCE=200809L

# Required to access peripheral registers using structs
# e.g. `uint32_t value: 8` sitting at a byte or word boundary will be 'optimised' to
Expand Down

0 comments on commit a29d463

Please sign in to comment.