Fix Windows builds (Issue #18)

This commit is contained in:
Michael R Sweet
2026-02-14 15:29:14 -05:00
parent d9444880c5
commit baa9fca941
2 changed files with 4 additions and 4 deletions

View File

@@ -1885,7 +1885,7 @@ pdfioFileCreateFontObjFromFile(
return (NULL);
}
if ((fd = open(filename, O_RDONLY | O_BINARY)) < 0)
if ((fd = open(filename, O_RDONLY | O_BINARY, 0)) < 0)
{
_pdfioFileError(pdf, "Unable to open font file '%s': %s", filename, strerror(errno));
return (NULL);
@@ -2021,7 +2021,7 @@ pdfioFileCreateICCObjFromFile(
return (NULL);
}
if ((fd = open(filename, O_RDONLY | O_BINARY)) < 0)
if ((fd = open(filename, O_RDONLY | O_BINARY, 0)) < 0)
{
_pdfioFileError(pdf, "Unable to open ICC profile '%s': %s", filename, strerror(errno));
return (NULL);
@@ -2180,7 +2180,7 @@ pdfioFileCreateImageObjFromFile(
return (NULL);
// Try opening the file...
if ((fd = open(filename, O_RDONLY | O_BINARY)) < 0)
if ((fd = open(filename, O_RDONLY | O_BINARY, 0)) < 0)
{
_pdfioFileError(pdf, "Unable to open image file '%s': %s", filename, strerror(errno));
return (NULL);

View File

@@ -1166,7 +1166,7 @@ pdfioFileOpen(
pdf->permissions = PDFIO_PERMISSION_ALL;
// Open the file...
if ((pdf->fd = open(filename, O_RDONLY | O_BINARY)) < 0)
if ((pdf->fd = open(filename, O_RDONLY | O_BINARY, 0)) < 0)
{
_pdfioFileError(pdf, "Unable to open file - %s", strerror(errno));
free(pdf->filename);