From: Thomas Weißschuh Date: Wed, 22 Apr 2026 21:01:28 +0000 (+0200) Subject: sulogin: guard oneline() behind __linux__ X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4151c6df3178f0e6b3028a06beca41e06248a1a;p=thirdparty%2Futil-linux.git sulogin: guard oneline() behind __linux__ This function is only used on Linux, so also put it behind the ifdef to avoid an unused function otherwise. Signed-off-by: Thomas Weißschuh --- diff --git a/login-utils/sulogin-consoles.c b/login-utils/sulogin-consoles.c index c35922ff1..c8156bfec 100644 --- a/login-utils/sulogin-consoles.c +++ b/login-utils/sulogin-consoles.c @@ -145,6 +145,7 @@ void emergency_do_mounts(void) { } #endif /* USE_SULOGIN_EMERGENCY_MOUNT */ +#ifdef __linux__ /* * Read and allocate one line from file, * the caller has to free the result @@ -175,7 +176,6 @@ char *oneline(const char * const file) return ret; } -#ifdef __linux__ /* * Read and determine active attribute for tty below * /sys/class/tty, the caller has to free the result.