diff --git a/gtests/net/packetdrill/packet_socket_pcap.c b/gtests/net/packetdrill/packet_socket_pcap.c
index ac51dc4fa2ca698ac17c1f747aa1feec7dcc4bd3..62bf7f9070291c7b469a2c60a163e76eca0602ab 100644
--- a/gtests/net/packetdrill/packet_socket_pcap.c
+++ b/gtests/net/packetdrill/packet_socket_pcap.c
@@ -74,7 +74,6 @@ extern void die_pcap_perror(pcap_t *pcap, char *message)
 
 static void packet_socket_setup(struct packet_socket *psock)
 {
-	int bpf_fd = -1;
 
 	DEBUGP("calling pcap_create() with %s\n", psock->name);
 	psock->pcap_in = pcap_create(psock->name, psock->pcap_error);
@@ -116,14 +115,6 @@ static void packet_socket_setup(struct packet_socket *psock)
 	if (pcap_setdirection(psock->pcap_out, PCAP_D_OUT) != 0)
 		die_pcap_perror(psock->pcap_out, "pcap_setdirection");
 
-	bpf_fd = pcap_get_selectable_fd(psock->pcap_in);
-	if (bpf_fd < 0)
-		die_pcap_perror(psock->pcap_in, "pcap_get_selectable_fd");
-
-	bpf_fd = pcap_get_selectable_fd(psock->pcap_out);
-	if (bpf_fd < 0)
-		die_pcap_perror(psock->pcap_out, "pcap_get_selectable_fd");
-
 	/* Find data link type. */
 	psock->data_link = pcap_datalink(psock->pcap_in);
 	DEBUGP("data_link: %d\n", psock->data_link);