Skip to content

Commit

Permalink
Fix android build (#74486)
Browse files Browse the repository at this point in the history
* handle it, similar to macOS

* Update src/worldfactory.cpp

style

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
WhiteCloud0123 and github-actions[bot] authored Jun 12, 2024
1 parent e46b0c7 commit 87a81b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/worldfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1989,13 +1989,13 @@ bool worldfactory::valid_worldname( const std::string &name, bool automated ) co

bool WORLD::create_timestamp()
{
#if defined( TIME_UTC ) && !defined( MACOSX )
#if defined( TIME_UTC ) && !defined( MACOSX ) && !defined(__ANDROID__)
std::timespec t;
if( std::timespec_get( &t, TIME_UTC ) != TIME_UTC ) {
return false;
}
#else
// MinGW-w64 with pthread, MacOS, etc
// MinGW-w64 with pthread, MacOS, Android, etc
timespec t;
if( clock_gettime( CLOCK_REALTIME, &t ) != 0 ) {
return false;
Expand Down

0 comments on commit 87a81b2

Please sign in to comment.