mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Remove check for accept() argument types
This check was used to accommodate a staggering variety in particular in the type of the third argument of accept(). This is no longer of concern on currently supported systems. We can just use socklen_t in the code and put in a simple check that substitutes int for socklen_t if it's missing, to cover the few stragglers. Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://www.postgresql.org/message-id/3538f4c4-1886-64f2-dcff-aaad8267fb82@enterprisedb.com
This commit is contained in:
@@ -37,6 +37,10 @@ typedef SOCKET pgsocket;
|
||||
#define PGINVALID_SOCKET INVALID_SOCKET
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SOCKLEN_T
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
/* non-blocking */
|
||||
extern bool pg_set_noblock(pgsocket sock);
|
||||
extern bool pg_set_block(pgsocket sock);
|
||||
|
||||
Reference in New Issue
Block a user