Include unistd.h when HAVE_UNISTD_H is defined, not _POSIX_SOURCE.
This requires that expat_config.h or winconfig.h has been included. Using unistd.h avoids warnings about close() and read() not being defined on some platforms. This closes SF bug #563184.
This commit is contained in:
parent
e5577d615f
commit
8fbcd0a5c7
@ -8,6 +8,11 @@ See the file COPYING for copying permission.
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#ifdef COMPILED_FROM_DSP
|
||||
#include "winconfig.h"
|
||||
#else
|
||||
#include "expat_config.h"
|
||||
#endif
|
||||
#include "expat.h"
|
||||
#include "xmlfile.h"
|
||||
#include "xmltchar.h"
|
||||
@ -17,7 +22,7 @@ See the file COPYING for copying permission.
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#ifdef _POSIX_SOURCE
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user