Re: BUG #14334: vacuumdb.c build failure on openbsd

From: jungle Boogie <jungleboogie0(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: jungleboogie0+psql(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14334: vacuumdb.c build failure on openbsd
Date: 2016-09-21 18:35:31
Message-ID: CAKE2PDsubyj=TS_Ub5B37zeyn-EA3+_FUB5sfwRevY5NupAnUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Alvaro,
On 21 September 2016 at 10:57, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> jungleboogie0+psql(at)gmail(dot)com wrote:
>
>> gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement
>> -Wendif-labels -Wmissing-format-attribute -Wformat-security
>> -fno-strict-aliasing -fwrapv -g -O2 -I../../../src/interfaces/libpq
>> -I../../../src/include -I/usr/local/include/libxml2 -I/usr/local/include
>> -I/usr/local/include -c -o vacuumdb.o vacuumdb.c
>> vacuumdb.c:70: error: expected declaration specifiers or '...' before
>> 'fd_set'
>> vacuumdb.c: In function 'main':
>> vacuumdb.c:193: error: 'FD_SETSIZE' undeclared (first use in this
>> function)
>
> What does your select(2) manpage say about what includes are required?
> My manpage says
>
> /* According to POSIX.1-2001 */
> #include <sys/select.h>
>
> /* According to earlier standards */
> #include <sys/time.h>
> #include <sys/types.h>
> #include <unistd.h>
>

http://man.openbsd.org/OpenBSD-current/man2/select.2

Also has #include <sys/select.h>

I'm checking out commit
https://github.com/postgres/postgres/commit/be7f7ee5ea73626c037600b515087e8f98038140

(day for the vacuum changes) to see if this will build. If not, maybe
it was a change within openbsd.

> and we're not including <sys/select.h> anywhere that I can see;
> apparently we should add something like
>
> #ifdef HAVE_SYS_SELECT_H
> #include <sys/select.h>
> #endif
>
> --
> Álvaro Herrera https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

--
-------
inum: 883510009027723
sip: jungleboogie(at)sip2sip(dot)info

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2016-09-21 19:22:51 Re: BUG #14334: vacuumdb.c build failure on openbsd
Previous Message Alvaro Herrera 2016-09-21 17:57:53 Re: BUG #14334: vacuumdb.c build failure on openbsd