diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-12-17 22:24:13 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-12-17 22:24:27 -0500 |
commit | 512f27cb3576d1ee1cb9a20463a33bd678e72db8 (patch) | |
tree | 03cce6e0781a548cb3db23e959a60e33ca4c67b8 | |
parent | f4f195d15c7cefb0d6435028c23b523d671c1ec7 (diff) |
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.
-rw-r--r-- | contrib/uuid-ossp/uuid-ossp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/uuid-ossp/uuid-ossp.c b/contrib/uuid-ossp/uuid-ossp.c index 3e12bc4e96f..5d00f392ccc 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 <netinet/in.h> +#include <arpa/inet.h> + /* * 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. |