Skip to content
Browse files

Revert "libc: types: Remove wrong definition"

This reverts commit 2a63e34.

This needs to be reverted as otherwise the type of ssize_t will be
"unsigned long" which is not correct.

    (gdb) ptype ssize_t
    type = unsigned long

For example this check would fail in that case

    ssize_t foo(void)
        return -1;
    if (foo() < 0) {
        printk("This is never called\n");

Fixes #17378

Signed-off-by: Jukka Rissanen <>
  • Loading branch information...
jukkar committed Jul 8, 2019
1 parent 1c7eecb commit b889120ca732d47ebf55b0395e9676bcb48049c7
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/libc/minimal/include/sys/types.h
@@ -15,7 +15,9 @@ typedef unsigned int mode_t;
#if !defined(__ssize_t_defined)
#define __ssize_t_defined

#define unsigned signed
typedef __SIZE_TYPE__ ssize_t;
#undef unsigned


0 comments on commit b889120

Please sign in to comment.
You can’t perform that action at this time.