]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sulogin: guard oneline() behind __linux__
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 22 Apr 2026 21:01:28 +0000 (23:01 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Sun, 3 May 2026 14:29:39 +0000 (16:29 +0200)
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 <thomas@t-8ch.de>
login-utils/sulogin-consoles.c

index c35922ff11c85f462c784a89b33e1db31126c0e2..c8156bfec115faf5134536bf6a4092bb15aabc70 100644 (file)
@@ -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.