summaryrefslogtreecommitdiff
path: root/net/py-pypcap/files/patch-setup.py
blob: a79f84986b3af0ec99adb3c973e64af575a8b2e5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- setup.py.orig	2005-10-16 19:07:03.000000000 -0400
+++ setup.py	2010-01-24 18:26:59.356418232 -0500
@@ -25,7 +25,7 @@
         d = {}
         if os.path.exists(os.path.join(cfg['include_dirs'][0], 'pcap-int.h')):
             d['HAVE_PCAP_INT_H'] = 1
-        buf = open(os.path.join(cfg['include_dirs'][0], 'pcap.h')).read()
+        buf = open(os.path.join(cfg['include_dirs'][1], 'pcap.h')).read()
         if buf.find('pcap_file(') != -1:
             d['HAVE_PCAP_FILE'] = 1
         if buf.find('pcap_compile_nopcap(') != -1:
@@ -46,6 +46,7 @@
                 incdirs = [ os.path.join(d, sd) ]
                 if os.path.exists(os.path.join(d, sd, 'pcap.h')):
                     cfg['include_dirs'] = [ os.path.join(d, sd) ]
+                    cfg['include_dirs'].append(os.path.join(d, 'include/pcap'))
                     for sd in ('lib', ''):
                         for lib in (('pcap', 'libpcap.a'),
                                     ('pcap', 'libpcap.dylib'),