Skip to content

Commit 6fd27e5

Browse files
authored
Fix Linux build failure (#17)
1 parent a89eb7d commit 6fd27e5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

icuSources/i18n/smpdtfmt.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@
8282
#include "dtptngen_impl.h" // for datePatternHasNumericCore()
8383
// rdar://106782612 compatibility: format with plain spaces for specific app(s)
8484
#include <stdlib.h> // for getprogname()
85+
#if U_PLATFORM_IS_DARWIN_BASED
8586
#include <os/log.h>
87+
#endif // U_PLATFORM_IS_DARWIN_BASED
8688
#endif // APPLE_ICU_CHANGES
8789

8890
#if APPLE_ICU_CHANGES
@@ -1325,7 +1327,7 @@ SimpleDateFormat::initialize(const Locale& locale,
13251327
{
13261328
if (U_FAILURE(status)) return;
13271329

1328-
#if APPLE_ICU_CHANGES
1330+
#if APPLE_ICU_CHANGES && U_PLATFORM_IS_DARWIN_BASED
13291331
// rdar://106782612&108035771 compatibility: format with plain spaces for specific app(s).
13301332
// This needs to be before the call to parsePattern(), which will do the space adjust.
13311333
fUsePlainSpaces = false;
@@ -1339,7 +1341,7 @@ SimpleDateFormat::initialize(const Locale& locale,
13391341
fUsePlainSpaces = true;
13401342
os_log(OS_LOG_DEFAULT, "ICU using compatibility space for date formatting");
13411343
}
1342-
#endif // APPLE_ICU_CHANGES
1344+
#endif // APPLE_ICU_CHANGES && U_PLATFORM_IS_DARWIN_BASED
13431345

13441346
parsePattern(); // Need this before initNumberFormatters(), to set fHasHanYearChar
13451347

0 commit comments

Comments
 (0)