1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-22 23:02:54 +03:00

In contrib/uuid-ossp, #include headers needed for ntohl() and ntohs().

Oversight in commit b8cc8f947.  I just noticed this causes compiler
warnings on FreeBSD, and it really ought to cause warnings elsewhere too:
all references I can find say that <arpa/inet.h> is required for these.
We have a lot of code elsewhere that thinks that both <netinet/in.h>
and <arpa/inet.h> should be included for these functions, so do it that
way here too, even though <arpa/inet.h> ought to be sufficient according
to the references I consulted.

Back-patch to 9.4 where the previous commit landed.
This commit is contained in:
Tom Lane 2016-12-17 22:24:13 -05:00
parent 7fa93eec4e
commit 4a0a34b5b6

View File

@ -17,6 +17,10 @@
#include "utils/builtins.h" #include "utils/builtins.h"
#include "utils/uuid.h" #include "utils/uuid.h"
/* for ntohl/htonl */
#include <netinet/in.h>
#include <arpa/inet.h>
/* /*
* It's possible that there's more than one uuid.h header file present. * It's possible that there's more than one uuid.h header file present.
* We expect configure to set the HAVE_ symbol for only the one we want. * We expect configure to set the HAVE_ symbol for only the one we want.