From 4226f910d45455856ee5b9855d1d9ce39b513aad Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Sun, 23 Dec 2012 22:44:05 +0100 Subject: sulogin: don't use {de,con}structor attributes We're not Russian roulette players, so don't use such ugly things at all.. Reported-by: Dave Reisner Signed-off-by: Karel Zak --- login-utils/sulogin-consoles.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'login-utils/sulogin-consoles.c') diff --git a/login-utils/sulogin-consoles.c b/login-utils/sulogin-consoles.c index 3729be448..e1d36711c 100644 --- a/login-utils/sulogin-consoles.c +++ b/login-utils/sulogin-consoles.c @@ -98,7 +98,6 @@ static uint32_t emergency_flags; # define MNT_PROCFS 0x0001 # define MNT_DEVTMPFS 0x0002 -static __attribute__((__destructor__)) void emergency_do_umounts(void) { if (emergency_flags & MNT_DEVTMPFS) @@ -107,7 +106,6 @@ void emergency_do_umounts(void) umount2("/proc", MNT_DETACH); } -static __attribute__((__constructor__)) void emergency_do_mounts(void) { struct stat rt, xt; @@ -143,6 +141,12 @@ void emergency_do_mounts(void) } } } + +#else /* !USE_SULOGIN_EMERGENCY_MOUNT */ + +void emergency_do_umounts(void) { } +void emergency_do_mounts(void) { } + #endif /* USE_SULOGIN_EMERGENCY_MOUNT */ /* -- cgit v1.2.3-55-g7522