Skip to content

Instantly share code, notes, and snippets.

@tuxillo
Created July 3, 2014 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxillo/7b5977e99a79d26d60de to your computer and use it in GitHub Desktop.
Save tuxillo/7b5977e99a79d26d60de to your computer and use it in GitHub Desktop.
From 2b8b1b0c9e13615015f611ff351e816e9b52aa23 Mon Sep 17 00:00:00 2001
From: Antonio Huete Jimenez <tuxillo@quantumachine.net>
Date: Thu, 3 Jul 2014 17:19:48 +0200
Subject: [PATCH] build - Add missing includes
- According to POSIX htonl() requires <arpa/inet.h> included
so explicitly include it to avoid build errors due to
-Wimplicit-function-declaration.
Signed-off-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>
---
src/gssapi.c | 1 +
src/packet_cb.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/gssapi.c b/src/gssapi.c
index da35899..30510bd 100644
--- a/src/gssapi.c
+++ b/src/gssapi.c
@@ -27,6 +27,7 @@
#include <unistd.h>
#endif
+#include <arpa/inet.h>
#include <gssapi/gssapi.h>
#include <libssh/gssapi.h>
diff --git a/src/packet_cb.c b/src/packet_cb.c
index a10dd1a..5b759a3 100644
--- a/src/packet_cb.c
+++ b/src/packet_cb.c
@@ -24,6 +24,7 @@
#include "config.h"
#include <stdlib.h>
+#include <arpa/inet.h>
#include "libssh/priv.h"
#include "libssh/buffer.h"
--
1.9.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment