dimkr / loksh

A Linux port of OpenBSD's ksh
117 stars 6 forks source link

Add stdlib.h include to io.c for mkstemp #5

Closed michaelforney closed 7 years ago

jsarenik commented 7 years ago

Looks good. Is there any reason the header is not included in the original code?

dimkr commented 7 years ago

No idea, actually - probably happens inside an included header. @michaelforney, can you provide me with a build failure log?

(btw, sorry for not giving any attention to this PR earlier, probably got lost in my inbox)

michaelforney commented 7 years ago

On Mon, Jan 23, 2017 at 11:25 AM, Dima Krasner notifications@github.com wrote:

No idea, actually - probably happens inside an included header. @michaelforney, can you provide me with a build failure log?

(btw, sorry for not giving any attention to this PR earlier, probably got lost in my inbox)

No error, just an implicit function declaration warning when building against musl libc:

io.c: In function 'maketemp': io.c:436:7: warning: implicit declaration of function 'mkstemp' [-Wimplicit-function-declaration] fd = mkstemp(path);

dimkr commented 7 years ago

Merged. I'm sure this isn't the only remaining warning and I did my best to fix the crucial ones cleanly, against glibc and musl, but more appear as compilers and C libraries evolve.

Thanks!