--- /dev/null
+--- a/tools/find_unknown/lpi_find_unknown.cc
++++ b/tools/find_unknown/lpi_find_unknown.cc
+@@ -219,7 +219,7 @@
+ dump_payload(ident->lpi, 0, pload_out, 500);
+ dump_payload(ident->lpi, 1, pload_in, 500);
+ str = (char *)malloc(750);
+- snprintf(str, 1000, "%s %s %u %u %u %.3f %.3f %" PRIu64 " %" PRIu64 " %s %s\n",
++ snprintf(str, 750, "%s %s %u %u %u %.3f %.3f %" PRIu64 " %" PRIu64 " %s %s\n",
+ s_ip, c_ip,
+ f->id.get_server_port(), f->id.get_client_port(),
+ f->id.get_protocol(), ident->start_ts,
+--- a/tools/protoident/lpi_protoident.cc
++++ b/tools/protoident/lpi_protoident.cc
+@@ -214,7 +214,7 @@
+ dump_payload(ident->lpi, 0, pload_out, 500);
+ dump_payload(ident->lpi, 1, pload_in, 500);
+ str = (char *)malloc(750);
+- snprintf(str, 1000, "%s %s %s %u %u %u %.3f %.3f %" PRIu64 " %" PRIu64 " %s %s\n",
++ snprintf(str, 750, "%s %s %s %u %u %u %.3f %.3f %" PRIu64 " %" PRIu64 " %s %s\n",
+ proto->name, s_ip, c_ip,
+ f->id.get_server_port(), f->id.get_client_port(),
+ f->id.get_protocol(), ident->start_ts,
--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils git-r3
+
+DESCRIPTION="A library that performs application layer protocol identification for flows"
+HOMEPAGE="http://research.wand.net.nz/software/libprotoident.php"
+EGIT_REPO_URI="https://github.com/wanduow/libprotoident"
+EGIT_BRANCH="develop"
+
+LICENSE="LGPL-3+"
+SLOT="0/2"
+KEYWORDS=""
+IUSE="static-libs +tools"
+
+DEPEND="
+ >=net-libs/libtrace-3.0.9
+ tools? ( net-libs/libflowmanager )
+"
+RDEPEND="
+ ${DEPEND}
+"
+PATCHES=(
+ "${FILESDIR}"/${PN}-9999-lpi_find_unknown-snprintf.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i -e '/-Werror/d' lib/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with tools)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}