[git commit] LT{,.old}: include stddef.h for size_t

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Wed Mar 13 08:46:18 UTC 2013


commit: http://git.uclibc.org/uClibc/commit/?id=f0489b5c7945ff32a4856e4705ce90576b4dece0
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

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-----------------------------

The fix is to make sure size_t is explicitly provided to pthreadtype.h

Signed-off-by: Vineet Gupta <vgupta at synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 .../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>
 


More information about the uClibc-cvs mailing list