[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Alpine: strscpy.c:25:1: error: unknown type name 'ssize_t'; did you
From: |
Emanuele Torre |
Subject: |
Re: Alpine: strscpy.c:25:1: error: unknown type name 'ssize_t'; did you mean 'size_t'? |
Date: |
Thu, 4 May 2023 02:57:19 +0200 |
User-agent: |
Mutt/2.2.10 (2023-03-25) |
On Wed, May 03, 2023 at 04:56:16PM -0700, Tianon Gravi wrote:
> I'm getting the following error when building the latest "devel"
> (23935dbe8513437e69ca14d6b0890067dddceba3) on Alpine Linux 3.17:
Techincally ssize_t is not part of standard C, and, according to
POSIX, it should be defined in <unistd.h> that that file is not
including.
Does this patch solve your problem?
emanuele6
---
lib/sh/strscpy.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/sh/strscpy.c b/lib/sh/strscpy.c
index 7a948ebe..e2679e95 100644
--- a/lib/sh/strscpy.c
+++ b/lib/sh/strscpy.c
@@ -22,6 +22,8 @@
#include <bashansi.h>
+#include <unistd.h>
+
ssize_t
strscpy (char *d, const char *s, size_t len)
{