Fix for compile error clog.c

Поиск
Список
Период
Сортировка
От Rene Pijlman
Тема Fix for compile error clog.c
Дата
Msg-id bfvfotohusn6bqi25c3tejc8prvjellvff@4ax.com
обсуждение исходный текст
Ответы Re: Fix for compile error clog.c
Список pgsql-patches
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 <sys/types.h>
       #include <sys/stat.h>
       #include <fcntl.h>

       int open(const char *pathname, int flags);

clog.c includes only <fcntl.h>. And indeed, when I add the
includes <sys/types.h> and <sys/stat.h> 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

Вложения

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Encryption addition to createuser
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Makefile.PL for Pg.so