This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compiling newlib natively [PATCH]


Shaun,

Can you discuss the mktime problem that the 2nd part of your patch is fixing? The change unfortunately breaks my linux newlib build whereas the glob.c change is fine.

-- Jeff J.

Shaun Jackman wrote:
I ran into two more problems while compiling newlib natively. time_t
is used before it is declared, and mktime is redefined. Here are the
fixes.

Cheers,
Shaun

newlib CVS 2004-11-26
glibc 2.3.2
Linux 2.6.8.1

2004-12-01 Shaun Jackman <sjackman@gmail.com>

	* libc/sys/linux/stdlib/glob.c: Include <sys/types.h> which defines
	time_t before including sys/stat.h, which uses it.
	* libc/sys/linux/sys/stat.h: Include <linux/time.h> outside of
	__KERNEL__ to avoid redefining mktime.


--- ./newlib/libc/sys/linux/stdlib/glob.c- 2004-12-01 10:58:15.000000000 -0800 +++ ./newlib/libc/sys/linux/stdlib/glob.c 2004-12-01 10:58:43.000000000 -0800 @@ -66,6 +66,7 @@ */

 #include <sys/param.h>
+#include <sys/types.h>
 #include <sys/stat.h>

 #include <ctype.h>
--- ./newlib/libc/sys/linux/sys/stat.h- 2004-11-30 15:42:34.000000000 -0800
+++ ./newlib/libc/sys/linux/sys/stat.h  2004-12-01 11:11:35.000000000 -0800
@@ -7,6 +7,7 @@
 #define _SYS_STAT_H

 #include <asm/stat.h>
+#include <linux/time.h>
 #define __KERNEL__
 #include <linux/stat.h>
 #undef __KERNEL__



On Tue, 30 Nov 2004 17:42:34 -0500, Jeff Johnston <jjohnstn@redhat.com> wrote:

This was fixed in August. Have you grabbed the latest sources?

2004-08-12 Jeff Johnston <jjohnstn@redhat.com>

        * libc/sys/linux/sys/types.h (u64): New typedef to allow building
        on linux systems with glibc 2.3.3 installed.
        * libc/sys/linux/dl/dl-runtime.c: Fix prototypes for fixup and
        profile_fixup so newlib can build on fc3 system.

-- Jeff J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]