Created
December 28, 2015 10:21
-
-
Save truthbk/c33469bfaf89516a91d4 to your computer and use it in GitHub Desktop.
Patch to build gopacket such that it links statically with libpcap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pcap/pcap.go b/pcap/pcap.go | |
index cfc8653..e54306b 100644 | |
--- a/pcap/pcap.go | |
+++ b/pcap/pcap.go | |
@@ -8,10 +8,10 @@ | |
package pcap | |
/* | |
-#cgo linux LDFLAGS: -lpcap | |
+#cgo linux LDFLAGS: /usr/lib/x86_64-linux-gnu/libpcap.a | |
#cgo freebsd LDFLAGS: -lpcap | |
#cgo openbsd LDFLAGS: -lpcap | |
-#cgo darwin LDFLAGS: -lpcap | |
+#cgo darwin LDFLAGS: /usr//local/Cellar/libpcap/1.7.4/lib/libpcap.a | |
#cgo windows CFLAGS: -I C:/WpdPack/Include | |
#cgo windows,386 LDFLAGS: -L C:/WpdPack/Lib -lwpcap | |
#cgo windows,amd64 LDFLAGS: -L C:/WpdPack/Lib/x64 -lwpcap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment