Re: com php-src: Include unistd.h for getpid(): ext/zip/lib/mkstemp.c
| From: | Kalle Sommer Nielsen | Date: | Tue, 13 Dec 2016 11:13:41 +0000 |
| Subject: | Re: com php-src: Include unistd.h for getpid(): ext/zip/lib/mkstemp.c | ||
| References: | 1 2 3 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-96319@lists.php.net to get a copy of this message | ||
Hi Sara
On Dec 13, 2016 8:26 AM, "Sara Golemon" <pollita@php.net> wrote:
>
> Commit: 613ee726a847489d92638bf3f80d380b0e24ccb2
> Author: Sara Golemon <pollita@php.net> Mon, 12 Dec 2016
21:44:07 -0800
> Parents: 448a5b38e60048238603e07092d4e3b2613a9b80
> Branches: master
>
> Link:
http://git.php.net/?p=php-src.git;a=commitdiff;h=613ee726a847489d92638bf3f80d380b0e24ccb2
>
> Log:
> Include unistd.h for getpid()
>
> Changed paths:
> M ext/zip/lib/mkstemp.c
>
>
> Diff:
> diff --git a/ext/zip/lib/mkstemp.c b/ext/zip/lib/mkstemp.c
> index 2ccd3a4..57d8848 100644
> --- a/ext/zip/lib/mkstemp.c
> +++ b/ext/zip/lib/mkstemp.c
> @@ -43,6 +43,7 @@
> #endif
> #include <stdio.h>
> #include <stdlib.h>
> +#include <unistd.h>
You should check for HAVE_UNISTD_H here, Windows do not have this header
and we have our own implementation for some UNISTD.h fuctions in
win32/unistd.h. But since it's for getpid(), which comes from <windows.h>,
you can omit anything elxtra for Windows and just check HAVE_UNISTD_H :)
>
> #ifndef O_BINARY
> #define O_BINARY 0
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>