@@ -46,7 +46,7 @@ static bool parseOsRelease(const char* fileName, FFOSResult* result)
4646 });
4747}
4848
49- static void getUbuntuFlavour (FFOSResult * result )
49+ FF_MAYBE_UNUSED static void getUbuntuFlavour (FFOSResult * result )
5050{
5151 const char * xdgConfigDirs = getenv ("XDG_CONFIG_DIRS" );
5252 if (!ffStrSet (xdgConfigDirs ))
@@ -143,7 +143,7 @@ static void getUbuntuFlavour(FFOSResult* result)
143143 }
144144}
145145
146- static void getDebianVersion (FFOSResult * result )
146+ FF_MAYBE_UNUSED static void getDebianVersion (FFOSResult * result )
147147{
148148 FF_STRBUF_AUTO_DESTROY debianVersion = ffStrbufCreate ();
149149 ffAppendFileBuffer ("/etc/debian_version" , & debianVersion );
@@ -153,7 +153,7 @@ static void getDebianVersion(FFOSResult* result)
153153 ffStrbufSet (& result -> versionID , & debianVersion );
154154}
155155
156- static bool detectDebianDerived (FFOSResult * result )
156+ FF_MAYBE_UNUSED static bool detectDebianDerived (FFOSResult * result )
157157{
158158 if (ffStrbufStartsWithS (& result -> prettyName , "Armbian " )) // Armbian 24.2.1 bookworm
159159 {
@@ -265,11 +265,13 @@ void ffDetectOSImpl(FFOSResult* os)
265265{
266266 detectOS (os );
267267
268+ #ifdef __linux__
268269 if (ffStrbufIgnCaseEqualS (& os -> id , "ubuntu" ))
269270 getUbuntuFlavour (os );
270271 else if (ffStrbufIgnCaseEqualS (& os -> id , "debian" ))
271272 {
272273 if (!detectDebianDerived (os ))
273274 getDebianVersion (os );
274275 }
276+ #endif
275277}
0 commit comments