Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111121070608.GA17419@albatros>
Date: Mon, 21 Nov 2011 11:06:08 +0400
From: Vasiliy Kulikov <segoon@...nwall.com>
To: owl-dev@...ts.openwall.com
Subject: glibc' time.h dependency on stdlib.h (was: glibc update)

Hi,

On Sun, Nov 20, 2011 at 18:17 +0400, Dmitry V. Levin wrote:
> > I thought it is an ABI compatibility issue and tried to rebuild SimplePAMApps:
> > 
> >     $ make PACKAGE=SimplePAMApps
> > 
> >     gcc -c -o login_indep.o  -D_GNU_SOURCE -Wall -W -pipe -O2 -fomit-frame-pointer -mpreferred-stack-boundary=2 -Wl,
> >     -z,relro -Wl,-z,now -Wall login_indep.c
> >     In file included from login_indep.c:2:0:
> >     /usr/include/string.h:548:5: error: unknown type name '__locale_t'
> >     /usr/include/string.h:552:18: error: unknown type name '__locale_t'
> 
> The __locale_t type is defined in <xlocale.h>; the latter is (in certain
> circumstances) included by <string.h>.

Yes, this would be expected, but:

build@...atros:~ $ cat a.c
#include <time.h>

int main(int argc, char *argv[])
{
    return 0;
}
build@...atros:~ $ gcc -D_GNU_SOURCE -Wall a.c -o a
In file included from a.c:1:0:
/usr/include/time.h:226:5: error: unknown type name '__locale_t'
build@...atros:~ $ gcc  -Wall a.c -o a
build@...atros:~ $

build@...atros:~ $ vim a.c
build@...atros:~ $ cat a.c
#include <stdlib.h>
#include <time.h>

int main(int argc, char *argv[])
{
	return 0;
}
build@...atros:~ $ gcc -D_GNU_SOURCE -Wall a.c -o a
build@...atros:~ $


A bug in glibc headers dependency?  Or time.h really must be included
only after explicit stdlib.h, which was not forced by our old glibc?

Thanks,

-- 
Vasiliy

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.