Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit14e2d9a

Browse files
committed
Include <sys/select.h> where needed
<sys/select.h> is required by POSIX.1-2001 to get the prototype ofselect(2), but nearly no systems enforce that because older standardslet you get away with including some other headers. Recent OpenBSDhacking has removed that frail touch of friendliness, however, whichbroke some compiles; fix all the way back to 9.1 by adding the requiredstandard. Only vacuumdb.c was reported to fail, but it seems easier tofix the whole lot in a fell swoop.Per bug #14334 by Sean Farrell.
1 parentf83b72e commit14e2d9a

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed

‎src/backend/libpq/auth.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
#include<netinet/in.h>
2121
#include<arpa/inet.h>
2222
#include<unistd.h>
23+
#ifdefHAVE_SYS_SELECT_H
24+
#include<sys/select.h>
25+
#endif
2326

2427
#include"libpq/auth.h"
2528
#include"libpq/crypt.h"

‎src/backend/postmaster/pgstat.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
#ifdefHAVE_SYS_POLL_H
3535
#include<sys/poll.h>
3636
#endif
37+
#ifdefHAVE_SYS_SELECT_H
38+
#include<sys/select.h>
39+
#endif
3740

3841
#include"pgstat.h"
3942

‎src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
#include<unistd.h>
1919
#include<dirent.h>
2020
#include<sys/stat.h>
21-
21+
#ifdefHAVE_SYS_SELECT_H
22+
#include<sys/select.h>
23+
#endif
2224
#ifdefHAVE_LIBZ
2325
#include<zlib.h>
2426
#endif

‎src/port/pgsleep.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
#include<unistd.h>
1616
#include<sys/time.h>
17+
#ifdefHAVE_SYS_SELECT_H
18+
#include<sys/select.h>
19+
#endif
1720

1821
/*
1922
* In a Windows backend, we don't use this implementation, but rather

‎src/test/examples/testlibpq2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
#include<errno.h>
3535
#include<sys/time.h>
3636
#include<sys/types.h>
37+
#ifdefHAVE_SYS_SELECT_H
38+
#include<sys/select.h>
39+
#endif
40+
3741
#include"libpq-fe.h"
3842

3943
staticvoid

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp