Update packfile.c
fixed file permissions to satisfy all builds.
@@ -434,9 +434,9 @@ int openPackfile(const char *filename, const char *packfilename)
#endif
packfilepointer[h] = 0;
-
+ int per = 666;
// Separate file present?
- if((handle = open(filename, O_RDONLY | O_BINARY, 0)) != -1)
+ if((handle = open(filename, O_RDONLY | O_BINARY, per)) != -1)
{
if((packfilesize[h] = lseek(handle, 0, SEEK_END)) == -1)
{
@@ -463,7 +463,7 @@ int openPackfile(const char *filename, const char *packfilename)
fspath = casesearch(".", filename);
if (fspath != NULL)
{
- if((handle = open(fspath, O_RDONLY | O_BINARY, 0)) != -1)
+ if((handle = open(fspath, O_RDONLY | O_BINARY, per)) != -1)
{
if((packfilesize[h] = lseek(handle, 0, SEEK_END)) == -1)
{
@@ -493,7 +493,7 @@ int openPackfile(const char *filename, const char *packfilename)
#endif
// Try to open packfile
- if((handle = open(packfilename, O_RDONLY | O_BINARY, 0) == -1)
+ if((handle = open(packfilename, O_RDONLY | O_BINARY, per) == -1)
{
#ifdef VERBOSE
printf ("perm err\n");
@@ -1245,8 +1245,8 @@ int pak_init()
else
{
#endif
-
- pakfd = open(packfile, O_RDONLY | O_BINARY, 0);
+ int per = 666;
+ pakfd = open(packfile, O_RDONLY | O_BINARY, per);
if(pakfd < 0)
{
@@ -1262,7 +1262,7 @@ int pak_init()
// Is it a valid Packfile
close(pakfd);
- pakfd = open(packfile, O_RDONLY | O_BINARY, 0);
+ pakfd = open(packfile, O_RDONLY | O_BINARY, per);
// Read magic dword ("PACK")
if(read(pakfd, &magic, 4) != 4 || magic != SwapLSB32(PACKMAGIC))
