Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130220184937.GU6181@port70.net>
Date: Wed, 20 Feb 2013 19:49:37 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: Fix for fields in utmp

* Chris Spiegel <cspiegel@...il.com> [2013-02-20 10:23:09 -0800]:
> The utmp.h header defines a few macros to access __ut_exit in the utmpx
> struct; however, the underscores were removed in utmpx, so the macros
> now point to non-existent struct members.  Attached is a simple patch
> which removes them.

note that the current code is not compatible with glibc

http://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/gnu/bits/utmpx.h
vs
http://git.musl-libc.org/cgit/musl/tree/include/utmpx.h

it seems the __ prefix depends on _GNU_SOURCE
and the 64bit abi is different on musl
(see ut_session and ut_tv)

> diff --git a/include/utmp.h b/include/utmp.h
> index b145a11..c24d0a8 100644
> --- a/include/utmp.h
> +++ b/include/utmp.h
> @@ -19,9 +19,6 @@ struct lastlog {
>  
>  #define ut_time ut_tv.tv_sec
>  #define ut_name ut_user
> -#define ut_exit __ut_exit
> -#define e_termination __e_termination
> -#define e_exit __e_exit
>  #define utmp utmpx
>  #define utmpname(x) (-1)
>  

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.