diff options
author | Stef Walter <stefw@gnome.org> | 2013-03-03 09:52:21 +0100 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-03-03 10:07:14 +0100 |
commit | 66ee55e5947682d10eed7a36b9da72a8cf6a40f2 (patch) | |
tree | c31d63c6149d67470f928151344643bbe4f3d194 /common/compat.h | |
parent | ae76545a0094114ef29dba52df97e69ab28b3dbc (diff) | |
download | p11-kit-66ee55e5947682d10eed7a36b9da72a8cf6a40f2.tar.gz |
Add compat strndup() function
Not available on Win32 and ancient unixes
Diffstat (limited to 'common/compat.h')
-rw-r--r-- | common/compat.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/compat.h b/common/compat.h index ad80ca5..27e4403 100644 --- a/common/compat.h +++ b/common/compat.h @@ -223,6 +223,13 @@ void * memdup (const void *data, #endif /* HAVE_MEMDUP */ +#ifndef HAVE_STRNDUP + +char * strndup (const char *data, + size_t length); + +#endif /* HAVE_STRDUP */ + #ifdef HAVE_STDBOOL_H #include <stdbool.h> #else |