Why are we including netinet/tcp.h so widely?

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Why are we including netinet/tcp.h so widely?
Date: 2017-09-29 22:24:44
Message-ID: 20170929222444.iybcyvfv6grw4wia@alap3.anarazel.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

A lot of files which currently include netinet/tcp.h. For most of them I
cannot recognize why, and it just seems to have been copied from one
file to the next.

E.g.
src/interfaces/libpq/{fe-secure,fe-protocol3,fe-protocol2,fe-secure}.c
src/backend/libpq/{be-secure,be-secure-openssl}.c
and probably some more.

Not that it's particularly harmful to include a superflous include, but
due to the #ifdef HAVE_NETINET_TCP_H it's three lines, and it seems to
be copied enough that I got curious.

Any reason that I'm missing? Old platforms? I couldn't find anything in
the archives.

Greetings,

Andres Freund

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-09-29 22:32:29 Re: Parallel Append implementation
Previous Message Fabien COELHO 2017-09-29 22:21:49 Re: pgbench - minor fix for meta command only scripts