From d9bb42946103ea9f16e7843bb70d6eb32c7c610f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Filipe=20La=C3=ADns?= <lains@archlinux.org>
Date: Sat, 30 May 2020 22:59:38 +0100
Subject: [PATCH] fix use system http-parser
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Filipe LaĆ­ns <lains@archlinux.org>
---
 httptools/parser/cparser.pxd | 2 +-
 setup.py                     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/httptools/parser/cparser.pxd b/httptools/parser/cparser.pxd
index bad2060..7644a1c 100644
--- a/httptools/parser/cparser.pxd
+++ b/httptools/parser/cparser.pxd
@@ -1,7 +1,7 @@
 from libc.stdint cimport uint16_t, uint32_t, uint64_t
 
 
-cdef extern from "../../vendor/http-parser/http_parser.h":
+cdef extern from "http_parser.h":
     ctypedef int (*http_data_cb) (http_parser*,
                                   const char *at,
                                   size_t length) except -1
diff --git a/setup.py b/setup.py
index ee6bd7d..f57124e 100644
--- a/setup.py
+++ b/setup.py
@@ -110,6 +110,7 @@ class httptools_build_ext(build_ext):
     def build_extensions(self):
         if self.use_system_http_parser:
             self.compiler.add_library('http_parser')
+            self.compiler.add_include_dir('/usr/lib/include')
 
             if sys.platform == 'darwin' and \
                     os.path.exists('/opt/local/include'):
-- 
2.26.2