@@ -171,7 +171,7 @@ static void PrintUsage(const char *aProgramName, FILE *aStream, int aExitCode)
171171 " -s --time-speed factor Time speed up factor.\n"
172172 " -v --verbose Also log to stderr.\n" ,
173173 aProgramName );
174- #ifdef __linux__
174+ #ifdef SIGRTMIN
175175 fprintf (aStream ,
176176 " --real-time-signal (Linux only) The real-time signal number for microsecond timer.\n"
177177 " Use +N for relative value to SIGRTMIN, and use N for absolute value.\n" );
@@ -189,7 +189,7 @@ static void ParseArg(int aArgCount, char *aArgVector[], PosixConfig *aConfig)
189189 aConfig -> mPlatformConfig .mSpeedUpFactor = 1 ;
190190 aConfig -> mLogLevel = OT_LOG_LEVEL_CRIT ;
191191 aConfig -> mPlatformConfig .mInterfaceName = OPENTHREAD_POSIX_CONFIG_THREAD_NETIF_DEFAULT_NAME ;
192- #ifdef __linux__
192+ #ifdef SIGRTMIN
193193 aConfig -> mPlatformConfig .mRealTimeSignal = SIGRTMIN ;
194194#endif
195195
@@ -244,7 +244,7 @@ static void ParseArg(int aArgCount, char *aArgVector[], PosixConfig *aConfig)
244244 case OT_POSIX_OPT_RADIO_VERSION :
245245 aConfig -> mPrintRadioVersion = true;
246246 break ;
247- #ifdef __linux__
247+ #ifdef SIGRTMIN
248248 case OT_POSIX_OPT_REAL_TIME_SIGNAL :
249249 if (optarg [0 ] == '+' )
250250 {
@@ -255,7 +255,7 @@ static void ParseArg(int aArgCount, char *aArgVector[], PosixConfig *aConfig)
255255 aConfig -> mPlatformConfig .mRealTimeSignal = atoi (optarg );
256256 }
257257 break ;
258- #endif // __linux__
258+ #endif
259259 case '?' :
260260 PrintUsage (aArgVector [0 ], stderr , OT_EXIT_INVALID_ARGUMENTS );
261261 break ;
0 commit comments