Fix for compile error clog.c
Fix for compile error clog.c
I'm getting a compile error in src/backend/access/transam in
current CVS:
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations
-I../../../../src/include -c -o clog.o clog.c
clog.c: In function `CLOGPhysicalReadPage':
clog.c:542: `S_IRUSR' undeclared (first use in this function)
clog.c:542: (Each undeclared identifier is reported only once
clog.c:542: for each function it appears in.)
clog.c:542: `S_IWUSR' undeclared (first use in this function)
clog.c: In function `CLOGPhysicalWritePage':
clog.c:593: `S_IRUSR' undeclared (first use in this function)
clog.c:593: `S_IWUSR' undeclared (first use in this function)
make: *** [clog.o] Error 1
The manual page open(2) on my Red Hat Linux 7.1 box says:
SYNOPSIS
#include
#include
#include
int open(const char *pathname, int flags);
clog.c includes only . And indeed, when I add the
includes and it compiles fine. So it
seems clog.c is just missing a few includes.
Attached is a patch to fix this problem. I see the same includes
in other files (e.g. xlog.c), so I assume this is portable.
Regards,
René Pijlman
Re: Fix for compile error clog.c
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Rene Pijlman writes: > clog.c includes only . And indeed, when I add the > includes and it compiles fine. Thanks. It compiled okay here, but evidently the location of those symbols isn't too standardized. Will fix. regards, tom lane