]> xenbits.xensource.com Git - people/liuw/stubdom.git/commitdiff
stubdom/newlib: Provide correct names for time.h timezone variables
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 28 May 2010 08:26:25 +0000 (09:26 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 28 May 2010 08:26:25 +0000 (09:26 +0100)
Newlib unaccountably defines _daylight, _timezone and _tzname, rather
than daylight, timezone and tzname.  The latter are specified in
SuSv3.

So do a global search and replace as part of our newlib patching :-(.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Makefile

index 43e8e9217bd5738e9e0376922883522725fd0407..cd18b9972d5500785ae7fc34fe410ff666b0a38a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -102,6 +102,8 @@ newlib-$(NEWLIB_VERSION): newlib-$(NEWLIB_VERSION).tar.gz
        patch -d $@ -p0 < newlib.patch
        patch -d $@ -p0 < newlib-chk.patch
        patch -d $@ -p1 < newlib-stdint-size_max-fix-from-1.17.0.patch
+       find $@ -type f | xargs perl -i.bak \
+               -pe 's/\b_(tzname|daylight|timezone)\b/$$1/g'
        touch $@
 
 NEWLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libc.a