public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: newlib@sourceware.org
Subject: [PATCH] RTEMS: Define ssize_t for <dirent.h>
Date: Fri, 23 Feb 2024 06:49:20 +0100	[thread overview]
Message-ID: <20240223054920.20618-1-sebastian.huber@embedded-brains.de> (raw)

This fixes the following build issue:

newlib/libc/include/dirent.h:84:1: error: unknown type name 'ssize_t'; did you mean '_ssize_t'?
   84 | ssize_t posix_getdents(int, void *, size_t, int);
      | ^~~~~~~
      | _ssize_t
---
 newlib/libc/sys/rtems/include/sys/dirent.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/newlib/libc/sys/rtems/include/sys/dirent.h b/newlib/libc/sys/rtems/include/sys/dirent.h
index d44047fa5..6f8ff4278 100644
--- a/newlib/libc/sys/rtems/include/sys/dirent.h
+++ b/newlib/libc/sys/rtems/include/sys/dirent.h
@@ -49,6 +49,11 @@ typedef	__off_t		off_t;
 #define	_OFF_T_DECLARED
 #endif
 
+#ifndef _SSIZE_T_DECLARED
+typedef _ssize_t ssize_t;
+#define	_SSIZE_T_DECLARED
+#endif
+
 typedef struct _dirdesc {
 	int	dd_fd;
 	long	dd_loc;
-- 
2.35.3


             reply	other threads:[~2024-02-23  5:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23  5:49 Sebastian Huber [this message]
2024-02-23 10:13 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240223054920.20618-1-sebastian.huber@embedded-brains.de \
    --to=sebastian.huber@embedded-brains.de \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).