From: Tom Lane Date: Sun, 18 Dec 2016 03:24:13 +0000 (-0500) Subject: In contrib/uuid-ossp, #include headers needed for ntohl() and ntohs(). X-Git-Tag: REL_10_BETA1~1238 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4a0a34b5b678f0292d3a85a85fb10c79c393be26;p=postgresql 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 is required for these. We have a lot of code elsewhere that thinks that both and should be included for these functions, so do it that way here too, even though ought to be sufficient according to the references I consulted. Back-patch to 9.4 where the previous commit landed. --- diff --git a/contrib/uuid-ossp/uuid-ossp.c b/contrib/uuid-ossp/uuid-ossp.c index 3e12bc4e96..5d00f392cc 100644 --- a/contrib/uuid-ossp/uuid-ossp.c +++ b/contrib/uuid-ossp/uuid-ossp.c @@ -17,6 +17,10 @@ #include "utils/builtins.h" #include "utils/uuid.h" +/* for ntohl/htonl */ +#include +#include + /* * 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.