From 3a747315b2b4db8d15efd7bcf29a6b8ff2e53a3f Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Sun, 25 Feb 2018 11:28:59 -0600 Subject: [PATCH] stdlib: Add common bsd mkstemps function Change-Id: I8c54f4b42e8b41f9a769b8b53f074a307b1a054c --- headers/compatibility/bsd/stdlib.h | 2 ++ src/system/libroot/posix/stdlib/mktemp.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/headers/compatibility/bsd/stdlib.h b/headers/compatibility/bsd/stdlib.h index d65871f812..6b9e0b726d 100644 --- a/headers/compatibility/bsd/stdlib.h +++ b/headers/compatibility/bsd/stdlib.h @@ -20,6 +20,8 @@ int daemon(int noChangeDir, int noClose); const char *getprogname(void); void setprogname(const char *programName); +int mkstemps(char *templat, int slen); + #ifdef __cplusplus } #endif diff --git a/src/system/libroot/posix/stdlib/mktemp.c b/src/system/libroot/posix/stdlib/mktemp.c index 513e767ce6..5923acee43 100644 --- a/src/system/libroot/posix/stdlib/mktemp.c +++ b/src/system/libroot/posix/stdlib/mktemp.c @@ -51,14 +51,12 @@ static int _gettemp(char *, int *, int, int); static const char padchar[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; -#if 0 int mkstemps(char *path, int slen) { int fd; return _gettemp(path, &fd, 0, slen) ? fd : -1; } -#endif int