From: Marcus Boerger Date: Tue, 16 Dec 2003 21:41:57 +0000 (+0000) Subject: MFH: Fix winbuild X-Git-Tag: php-4.3.5RC1~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3543b425f3f707cd4d34fbef38da50d87d0e431;p=php MFH: Fix winbuild --- diff --git a/ext/dba/dba_flatfile.c b/ext/dba/dba_flatfile.c index 4444f2c6e5..576268ae06 100644 --- a/ext/dba/dba_flatfile.c +++ b/ext/dba/dba_flatfile.c @@ -48,8 +48,13 @@ DBA_OPEN_FUNC(flatfile) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not cast stream"); return FAILURE; } +#ifdef F_SETFL + /* Needed becasue some systems do not allow to write to the original + * file contents with O_APPEND being set. + */ flags = fcntl(fd, F_SETFL); fcntl(fd, F_SETFL, flags & ~O_APPEND); +#endif } info->dbf = pemalloc(sizeof(flatfile), info->flags&DBA_PERSISTENT);