A user application built with -D_POSIX_C_SOURCE=200112L and
#include signal.h, yields following compilation error:
------------------->8-----------------------------
arc-linux-uclibc-gcc -D_POSIX_C_SOURCE=200112L hello.c
In file included from
/opt/INSTALL/lib/gcc/arc-linux-uclibc/4.4.7/../../../../arc-linux-uclibc/sys-include/signal.h:429,
from hello.c:1:
/opt/INSTALL/lib/gcc/arc-linux-uclibc/4.4.7/../../../../arc-linux-uclibc/sys-include/bits/pthreadtypes.h:48:
error: expected specifier-qualifier-list before 'size_t'
------------------->8-----------------------------
I can confirm that an ARM buildroot based toolchain, configured with
uClibc daily
snapshot (BR2_UCLIBC_VERSION_SNAPSHOT) + old pthreads suffers from same
problem.
----------------------->8---------------------------
./host/usr/bin/arm-linux-gcc test.c -D_POSIX_C_SOURCE=200112L
In file included from
/home/vineetg/arc/buildroot/VERSATILE/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/signal.h:429:0,
from test.c:1:
/home/vineetg/arc/buildroot/VERSATILE/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/bits/pthreadtypes.h:48:3:
error: unknown type name 'size_t'
/home/vineetg/arc/buildroot/VERSATILE/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/bits/pthreadtypes.h:51:3:
error: unknown type name 'size_t'
----------------------->8---------------------------
The fix is to make sure size_t is explicitly provided to pthreadtype.h
Signed-off-by: Vineet Gupta <[email protected]>
---
.../sysdeps/pthread/bits/pthreadtypes.h | 3 +++
.../sysdeps/pthread/bits/pthreadtypes.h | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/libpthread/linuxthreads.old/sysdeps/pthread/bits/pthreadtypes.h
b/libpthread/linuxthreads.old/sysdeps/pthread/bits/pthreadtypes.h
index faec63b..3eb5929 100644
--- a/libpthread/linuxthreads.old/sysdeps/pthread/bits/pthreadtypes.h
+++ b/libpthread/linuxthreads.old/sysdeps/pthread/bits/pthreadtypes.h
@@ -19,6 +19,9 @@
#ifndef _BITS_PTHREADTYPES_H
#define _BITS_PTHREADTYPES_H 1
+#define __need_size_t
+#include <stddef.h>
+
#define __need_schedparam
#include <bits/sched.h>
diff --git a/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h
b/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h
index 4ea6d8a..8d01c89 100644
--- a/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h
+++ b/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h
@@ -19,6 +19,9 @@
#ifndef _BITS_PTHREADTYPES_H
#define _BITS_PTHREADTYPES_H 1
+#define __need_size_t
+#include <stddef.h>
+
#define __need_schedparam
#include <bits/sched.h>
--
1.7.4.1
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc